/* =====================================================================
   client.css — стили клиентской части KotivahtiPro (кабинет клиента, вход, регистрация).
   Подключается только в resources/views/layouts/app.blade.php.

   Порядок разделов:
     1. База (шапка, карточки, формы, кнопки, метки, подвал)
     2. Общие компоненты (фото дома, рапорт посещения, сворачиваемые блоки)
     3. Страницы — правила обёрнуты в :where(.pg-ИМЯ):
        класс pg-ИМЯ ставит layout на <body> из @section('page', 'ИМЯ').
        :where() не добавляет «веса» селектору, поэтому правила разных страниц
        с одинаковыми классами (.package-card, .form-actions…) не мешают друг другу.
        Мобильные правила страницы — в конце её раздела.
     4. Утилиты (вместо style="..." в шаблонах)
   ===================================================================== */


/* =====================================================================
   1. БАЗА
   ===================================================================== */

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; background: #f3f5f8; color: #1f2937; min-height: 100vh; display: flex; flex-direction: column; }
header { background: #1e3a5f; color: #fff; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; }
header a { color: #fff; text-decoration: none; font-weight: 600; }
main { max-width: 900px; margin: 32px auto; padding: 0 16px; flex: 1; width: 100%; }
.card { background: #fff; border-radius: 12px; padding: 28px; box-shadow: 0 2px 8px rgba(0,0,0,.06); max-width: 480px; margin: 0 auto; }
.card.wide { max-width: 720px; }
h1 { margin-top: 0; }

/* ----- Формы и кнопки ----- */
label { display: block; margin: 14px 0 4px; font-size: 14px; font-weight: 600; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
    width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 15px; font-family: inherit;
}
.check { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.check label { margin: 0; font-weight: 400; }
button, .btn { background: #1e3a5f; color: #fff; border: 0; padding: 11px 18px; border-radius: 8px; font-size: 15px; cursor: pointer; margin-top: 20px; width: 100%; }
a.btn { display: block; text-decoration: none; text-align: center; }
button.link { background: none; width: auto; margin: 0; padding: 0; text-decoration: underline; }
header button.link { color: #fff; } /* кнопка «Kirjaudu ulos» в шапке */
/* Шапка справа: переключатель языка FI | EN и «Kirjaudu ulos» (layouts/app) */
.header-actions { display: flex; align-items: center; gap: 18px; }
header form { margin: 0; }
.lang-switch { display: flex; align-items: center; gap: 2px; font-size: 14px; }
.lang-switch a, .lang-switch span { padding: 2px 6px; border-radius: 4px; }
.lang-switch a { opacity: .75; font-weight: 600; }
.lang-switch a:hover { opacity: 1; }
.lang-switch .is-active { background: rgba(255,255,255,.18); font-weight: 700; }
button.danger { background: #b91c1c; }
button.light, a.btn.light { background: #e5e7eb; color: #1f2937; }
.error { color: #b91c1c; font-size: 13px; margin-top: 4px; }

/* Сообщения */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.flash.ok { background: #dcfce7; color: #166534; }
.flash.err { background: #fee2e2; color: #991b1b; }

/* ----- Текст, таблицы, линии ----- */
.muted { color: #64748b; font-size: 14px; text-align: center; margin-top: 16px; }
.muted a { color: #1e3a5f; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #e5e7eb; font-size: 14px; }
hr { border: 0; border-top: 1px solid #e5e7eb; margin: 16px 0; }

/* Метки состояния: классы приходят из Order::state(), config kotivahti.extra_statuses и т.п. */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; vertical-align: middle; }
.badge.active { background: #dcfce7; color: #166534; }
.badge.pending { background: #fef9c3; color: #854d0e; }
.badge.expired { background: #e5e7eb; color: #4b5563; }
.badge.completed { background: #dbeafe; color: #1e40af; } /* Valmis: всё оплаченное выполнено */

/* Печать (чек): шапку, подвал и кнопки не печатаем */
@media print { header, footer, .noprint { display: none; } body { background: #fff; } }

/* Длинный текст клиента (комментарии, пожелания, адрес) переносится и не вылезает за рамку */
.card { overflow-wrap: anywhere; word-break: break-word; }
.card li, .card p, .card small { min-width: 0; }

/* Кнопки не наследуют перенос "где угодно" от .card.
   Иначе во flex-строке (например, "Muokkaa" + текст рядом) кнопка сжимается
   до ширины одной буквы и слово ломается. Перенос только по пробелам. */
.card button, .card .btn { overflow-wrap: normal; word-break: normal; }

/* Подвал */
footer {
    background: #1e3a5f;
    color: #cbd5e1;
    padding: 20px 24px;
    text-align: center;
    font-size: 13px;
    margin-top: auto;
}
footer .copy {
    margin-top: 8px;
    color: #94a3b8;
}


/* =====================================================================
   2. ОБЩИЕ КОМПОНЕНТЫ
   ===================================================================== */

/* ----- Фото дома: partials/house-photo (img.photo или заглушка) ----- */
img.photo { max-width: 100%; border-radius: 8px; margin-top: 12px; }
.photo-placeholder { background: #e5e7eb; color: #6b7280; border-radius: 8px; height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 14px; margin-top: 12px; }
.photo-placeholder span { font-size: 40px; }
/* Маленькая версия (список домов) */
.photo-placeholder.small { width: 72px; height: 72px; margin-top: 0; font-size: 11px; flex-shrink: 0; }
.photo-placeholder.small span { font-size: 24px; }
img.photo.small { width: 72px; height: 72px; object-fit: cover; margin-top: 0; flex-shrink: 0; }


/* ----- Сворачиваемый рапорт и сводка выездов: partials/visit-work ----- */
/* Сводка над списком выездов: «Tehty 4 / 10 · Seuraava käynti 28.11.2026» */
.visits-summary { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: #475569; margin: 0 0 12px; text-align: left; }
.visits-summary strong { color: #1e293b; }
/* Заголовок группы: «Tulevat käynnit» / «Aiemmat käynnit» */
.visits-group-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #64748b; margin: 16px 0 4px; text-align: left; }
.visits-group-title:first-child { margin-top: 0; }
/* Свёрнутый рапорт */
details.visit-details { margin-top: 6px; }
details.visit-details > summary { cursor: pointer; color: #1e3a5f; font-size: 14px; font-weight: 600; padding: 4px 0; }
details.visit-details > summary:hover { text-decoration: underline; }


/* ----- Зоны страницы — пакет / käynnit ja raportit / lisäpalvelut -----
   Цветная полоса слева сразу показывает, к чему относится блок:
   синяя = пакет (оплаченный заказ), зелёная = посещения и рапорты, жёлтая = доп. услуги (оплачиваются отдельно).
   Размер и отступы заголовков НЕ меняем: остаются стили страницы. */
.zone { border-left: 5px solid #cbd5e1; text-align: left; }
.zone:not(.card) { padding-left: 14px; }
.zone.package { border-left-color: #3b82f6; }
.zone.visits  { border-left-color: #22c55e; }
.zone.extras  { border-left-color: #f59e0b; }
.zone-sub { margin: 0 0 12px; font-size: 13px; color: #64748b; text-align: left; }
.zone-link { display: inline-block; margin-top: 4px; font-size: 14px; font-weight: 600; color: #1e3a5f; }

/* Заголовок месяца в длинном списке прошлых выездов: «Marraskuu 2026» */
.visits-month { list-style: none; font-size: 13px; font-weight: 700; color: #166534; margin: 12px 0 4px; padding-bottom: 2px; border-bottom: 1px solid #dcfce7; text-align: left; }

/* ----- Жёлтая подсказка «Lisäpalvelut ovat lisämaksullisia»: partials/extras-notice ----- */
.extras-notice { background: #fefce8; border: 1px solid #fde68a; color: #713f12; border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; font-size: 14px; line-height: 1.5; text-align: left; }
.extras-notice strong { display: block; margin-bottom: 2px; }

/* ----- Список доп. услуг дома: partials/extras-list ----- */
.xl-group { margin: 0 0 14px; text-align: left; }
.xl-group-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #64748b; margin: 0 0 2px; }
.xl-group.by-admin .xl-group-title { color: #92400e; }
.xl-group-sub { font-size: 13px; color: #64748b; margin: 0 0 6px; }
.xl-list { list-style: none; margin: 0; padding: 0; }
.xl-list li { padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.xl-list li:last-child { border-bottom: 0; }
.xl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.xl-name { font-weight: 600; }
.xl-date { color: #94a3b8; font-size: 12px; }
.xl-note { white-space: pre-line; font-size: 14px; color: #475569; margin-top: 4px; }
.xl-empty { color: #64748b; font-size: 14px; text-align: left; margin: 0; }


/* =====================================================================
   3. СТРАНИЦЫ
   ===================================================================== */

/* ----- dashboard (pg-dashboard) ----- */
/* ===== Etusivu (dashboard) ===== */
:where(.pg-dashboard) .dashboard-header {
    margin-bottom: 28px;
}

:where(.pg-dashboard) .dashboard-header h1 {
    margin: 0 0 4px;
}

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

:where(.pg-dashboard) .dash-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px 16px 24px;
    text-decoration: none;
    color: #1e3a5f;
    transition: all 0.15s ease;
}

:where(.pg-dashboard) .dash-tile:hover {
    background: #fff;
    border-color: #1e3a5f;
    box-shadow: 0 4px 14px rgba(30, 58, 95, 0.1);
    transform: translateY(-3px);
}

:where(.pg-dashboard) .dash-icon {
    font-size: 36px;
    margin-bottom: 12px;
    line-height: 1;
}

:where(.pg-dashboard) .dash-label {
    font-size: 16px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 4px;
}

:where(.pg-dashboard) .dash-desc {
    font-size: 13px;
    color: #64748b;
    font-weight: 400;
}

/* Адаптив */
@media (max-width: 480px) {
    :where(.pg-dashboard) .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ----- extras/create (pg-extras-create) ----- */
/* Форма заказа доп. услуг */
:where(.pg-extras-create) .service-group {
    margin-bottom: 20px;
}

:where(.pg-extras-create) .service-group-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #64748b;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
}

:where(.pg-extras-create) .service-item {
    margin-bottom: 6px;
}

:where(.pg-extras-create) .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

:where(.pg-extras-create) .form-actions .btn {
    width: auto;
    margin: 0;
    min-width: 140px;
}

@media (max-width: 560px) {
    :where(.pg-extras-create) .form-actions {
        flex-direction: column;
    }
    :where(.pg-extras-create) .form-actions .btn {
        width: 100%;
    }
}

/* ----- orders/form (pg-orders-form) ----- */
/* ===== Форма заказа ===== */
:where(.pg-orders-form) .property-display {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
}

:where(.pg-orders-form) .hint-box {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #475569;
    margin-top: 12px;
    line-height: 1.45;
}

:where(.pg-orders-form) .hint {
    margin: 10px 0 0;
    font-size: 13px;
    color: #94a3b8;
}

:where(.pg-orders-form) .sub-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 20px 0 10px;
}

:where(.pg-orders-form) .schedule-block {
    margin-top: 8px;
}

:where(.pg-orders-form) .nested-block {
    margin-top: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

:where(.pg-orders-form) .char-counter {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #94a3b8;
}

/* Группы услуг */
:where(.pg-orders-form) .service-group {
    margin-bottom: 20px;
}

:where(.pg-orders-form) .service-group-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #64748b;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
}

:where(.pg-orders-form) .service-item {
    margin-bottom: 6px;
}

:where(.pg-orders-form) .service-details {
    margin-left: 28px;
}

:where(.pg-orders-form) .details-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

:where(.pg-orders-form) .package-switch label {
    margin-top: 0;
}

:where(.pg-orders-form) .package-switch select {
    margin-bottom: 0;
}

/* Классы form-section, form-row, form-group, form-actions здесь своих правил не имеют:
   правила других страниц ограничены :where(.pg-…) и на эту страницу не действуют */

/* ----- orders/index (pg-orders-index) ----- */
/* ===== Omat palvelut ===== */
:where(.pg-orders-index) .services-section {
    margin-bottom: 32px;
}

:where(.pg-orders-index) .services-section .section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin: 0 0 14px;
}

:where(.pg-orders-index) .services-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

:where(.pg-orders-index) .service-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}

:where(.pg-orders-index) .service-card:hover {
    background: #fff;
    border-color: #1e3a5f;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.08);
    transform: translateY(-1px);
}

:where(.pg-orders-index) .service-main {
    flex: 1;
    min-width: 0;
}

:where(.pg-orders-index) .service-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

:where(.pg-orders-index) .service-address {
    font-size: 14px;
    color: #475569;
    margin-bottom: 6px;
}

:where(.pg-orders-index) .service-meta {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

:where(.pg-orders-index) .service-meta .price {
    font-weight: 600;
    color: #1e293b;
}

:where(.pg-orders-index) .service-meta .dot {
    color: #cbd5e1;
}

:where(.pg-orders-index) .service-arrow {
    color: #94a3b8;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}

:where(.pg-orders-index) .service-card:hover .service-arrow {
    color: #1e3a5f;
    transform: translateX(3px);
}

/* Адаптив */
@media (max-width: 560px) {
    :where(.pg-orders-index) .service-card {
        padding: 14px;
    }

    :where(.pg-orders-index) .service-name {
        font-size: 15px;
    }
}

/* ----- orders/packages (pg-orders-packages) ----- */
/* ===== Valitse paketti ===== */
:where(.pg-orders-packages) .packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

:where(.pg-orders-packages) .package-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px 22px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.15s ease;
}

:where(.pg-orders-packages) .package-card:hover {
    background: #fff;
    border-color: #1e3a5f;
    box-shadow: 0 4px 14px rgba(30, 58, 95, 0.08);
    transform: translateY(-2px);
}

:where(.pg-orders-packages) .package-card.is-urgent {
    background: #fef2f2;
    border: 2px solid #dc2626;
}

:where(.pg-orders-packages) .package-card.is-urgent:hover {
    border-color: #b91c1c;
    box-shadow: 0 4px 14px rgba(185, 28, 28, 0.12);
}

:where(.pg-orders-packages) .package-badge-urgent {
    font-size: 12px;
    font-weight: 700;
    color: #b91c1c;
    margin-bottom: 10px;
}

:where(.pg-orders-packages) .package-name {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 8px;
}

:where(.pg-orders-packages) .package-card.is-urgent .package-name {
    color: #b91c1c;
}

:where(.pg-orders-packages) .package-visits {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
}

:where(.pg-orders-packages) .package-price {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
}

:where(.pg-orders-packages) .package-card.is-urgent .package-price {
    color: #b91c1c;
}

:where(.pg-orders-packages) .package-card .btn {
    width: 100%;
    margin-top: auto;
    margin-bottom: 0;
}

/* Адаптив */
@media (max-width: 560px) {
    :where(.pg-orders-packages) .packages-grid {
        grid-template-columns: 1fr;
    }
}

/* ----- orders/receipt (pg-orders-receipt) ----- */
/* ===== Kuitti ===== */
:where(.pg-orders-receipt) .receipt {
    border: 1px solid #e2e8f0;
    padding: 40px 44px;
    border-radius: 8px;
    background: #fff;
    max-width: 580px;
    margin: 0 auto;
    font-size: 14px;
    line-height: 1.5;
    color: #1e293b;
}

/* Шапка */
:where(.pg-orders-receipt) .receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid #1e3a5f;
}

:where(.pg-orders-receipt) .company-name {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a5f;
}

/* Реквизиты фирмы в несколько строк, чуть темнее, чтобы читались при печати */
:where(.pg-orders-receipt) .company-details {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.6;
    color: #64748b;
}

/* Ссылки телефона и почты выглядят как обычный текст (и на экране, и на печати) */
:where(.pg-orders-receipt) .company-details a {
    color: inherit;
    text-decoration: none;
}

:where(.pg-orders-receipt) .company-details a:hover {
    text-decoration: underline;
}

:where(.pg-orders-receipt) .receipt-title-block {
    text-align: right;
}

:where(.pg-orders-receipt) .receipt-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #1e3a5f;
}

:where(.pg-orders-receipt) .receipt-number {
    margin-top: 2px;
    font-size: 13px;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

/* Мета */
:where(.pg-orders-receipt) .receipt-meta {
    display: flex;
    gap: 40px;
    margin-bottom: 16px;
}

:where(.pg-orders-receipt) .meta-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 2px;
}

:where(.pg-orders-receipt) .meta-value {
    font-size: 14px;
    font-weight: 500;
}

:where(.pg-orders-receipt) .status-paid {
    color: #166534;
}

:where(.pg-orders-receipt) .receipt-notice {
    background: #fef9c3;
    color: #854d0e;
    font-size: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 28px;
}

/* Стороны */
:where(.pg-orders-receipt) .receipt-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 32px;
}

:where(.pg-orders-receipt) .party-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 6px;
}

:where(.pg-orders-receipt) .party-value {
    font-size: 14px;
    line-height: 1.55;
}

/* Блоки услуги */
:where(.pg-orders-receipt) .receipt-block {
    margin-bottom: 24px;
}

:where(.pg-orders-receipt) .block-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 8px;
}

:where(.pg-orders-receipt) .block-content {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px 18px;
}

:where(.pg-orders-receipt) .service-name {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

:where(.pg-orders-receipt) .service-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #475569;
}

:where(.pg-orders-receipt) .detail-label {
    display: inline-block;
    min-width: 100px;
    color: #94a3b8;
    font-weight: 500;
}

:where(.pg-orders-receipt) .schedule-note {
    margin-top: 4px;
    margin-left: 100px;
    font-size: 12px;
    color: #64748b;
    white-space: pre-line;
}

:where(.pg-orders-receipt) .services-content {
    font-size: 13px;
    color: #475569;
}

/* Итого */
:where(.pg-orders-receipt) .receipt-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-top: 2px solid #1e3a5f;
    padding-top: 18px;
    margin-top: 8px;
    margin-bottom: 28px;
    font-size: 15px;
    font-weight: 600;
}

:where(.pg-orders-receipt) .total-amount {
    font-size: 24px;
    font-weight: 700;
    color: #1e3a5f;
}

/* Подвал */
:where(.pg-orders-receipt) .receipt-footer {
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

/* Кнопки */
:where(.pg-orders-receipt) .receipt-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 28px;
}

:where(.pg-orders-receipt) .receipt-actions .btn {
    width: auto;
    margin: 0;
    min-width: 160px;
}

/* Печать */
@media print {
    :where(.pg-orders-receipt) header, :where(.pg-orders-receipt) footer, :where(.pg-orders-receipt) .noprint, :where(.pg-orders-receipt) .receipt-actions {
        display: none !important;
    }
    body:where(.pg-orders-receipt) { background: #fff; }
    :where(.pg-orders-receipt) .card {
        box-shadow: none;
        padding: 0;
        max-width: none;
    }
    :where(.pg-orders-receipt) .receipt {
        border: none;
        padding: 0;
        max-width: none;
    }
}

@media (max-width: 560px) {
    :where(.pg-orders-receipt) .receipt {
        padding: 24px 18px;
    }
    :where(.pg-orders-receipt) .receipt-header {
        flex-direction: column;
        gap: 14px;
    }
    :where(.pg-orders-receipt) .receipt-title-block {
        text-align: left;
    }
    :where(.pg-orders-receipt) .receipt-parties {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    :where(.pg-orders-receipt) .receipt-meta {
        flex-direction: column;
        gap: 12px;
    }
    :where(.pg-orders-receipt) .detail-label {
        min-width: 80px;
    }
    :where(.pg-orders-receipt) .schedule-note {
        margin-left: 0;
    }
    :where(.pg-orders-receipt) .receipt-actions {
        flex-direction: column;
    }
    :where(.pg-orders-receipt) .receipt-actions .btn {
        width: 100%;
    }
}

/* ----- orders/show (pg-orders-show) ----- */
/* ===== Страница заказа (Tilaus) ===== */
:where(.pg-orders-show) .order-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

:where(.pg-orders-show) .order-header h1 {
    margin: 0;
    font-size: 24px;
    display: inline;
}

:where(.pg-orders-show) .order-header .badge {
    vertical-align: middle;
    margin-left: 8px;
}

/* Сетка информации */
:where(.pg-orders-show) .order-info {
    margin-bottom: 8px;
}

:where(.pg-orders-show) .form-subtitle {
    margin: 12px 0 0;
    padding: 12px 16px;
    background: #fffbeb;              /* тёплый светло-жёлтый */
    border-left: 4px solid #f59e0b;   /* янтарная полоска */
    border-radius: 6px;
    color: #92400e;                   /* тёмно-янтарный текст */
    font-size: 14px;
    line-height: 1.5;
}

:where(.pg-orders-show) .info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
}

:where(.pg-orders-show) .info-item .label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #64748b;
    margin-bottom: 4px;
}

:where(.pg-orders-show) .info-item .value {
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
}

:where(.pg-orders-show) .info-item .value.price {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a5f;
}

:where(.pg-orders-show) .info-item.full {
    grid-column: 1 / -1;
}

:where(.pg-orders-show) .schedule-note {
    margin-top: 6px;
    font-size: 13px;
    color: #64748b;
    white-space: pre-line;
}

:where(.pg-orders-show) .text-muted {
    color: #94a3b8;
    font-size: 14px;
}

/* Секция услуг */
:where(.pg-orders-show) .order-section h2 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

:where(.pg-orders-show) .services-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
}

/* Посещение: строка с датой и статусом, под ней работы и рапорт */
:where(.pg-orders-show) .visit-block {
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

:where(.pg-orders-show) .visit-block:last-child {
    border-bottom: 0;
}

:where(.pg-orders-show) .visit-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Кнопки действий */
:where(.pg-orders-show) .order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

:where(.pg-orders-show) .order-actions .btn {
    width: auto;
    margin: 0;
    min-width: 140px;
}

:where(.pg-orders-show) .order-actions .delete-form {
    margin: 0;
}

:where(.pg-orders-show) .order-actions .delete-form .btn {
    width: auto;
}

/* Адаптив */
@media (max-width: 560px) {
    :where(.pg-orders-show) .info-grid {
        grid-template-columns: 1fr;
    }

    :where(.pg-orders-show) .order-actions {
        flex-direction: column;
    }

    :where(.pg-orders-show) .order-actions .btn,
    :where(.pg-orders-show) .order-actions .delete-form .btn {
        width: 100%;
    }
}

/* ----- pages/extras (pg-pages-extras) ----- */
/* Лёгкое улучшение Lisäpalvelut */
:where(.pg-pages-extras) .extra-block {
    margin-bottom: 24px;
}

:where(.pg-pages-extras) .extra-block h2 {
    font-size: 16px;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0 0 8px;
}

:where(.pg-pages-extras) .extra-block ul {
    margin: 0 0 0 18px;
    padding: 0;
}

:where(.pg-pages-extras) .extra-block li {
    margin-bottom: 4px;
    font-size: 15px;
}

/* ----- pages/profile (pg-pages-profile) ----- */
/* ===== Профиль ===== */
:where(.pg-pages-profile) .profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 8px;
}

:where(.pg-pages-profile) .avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #1e3a5f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    flex-shrink: 0;
}

:where(.pg-pages-profile) .profile-info h1 {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 700;
}

:where(.pg-pages-profile) .profile-info .muted {
    margin: 0;
    text-align: left;
}

:where(.pg-pages-profile) .profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
    margin: 24px 0 28px;
}

:where(.pg-pages-profile) .profile-item .label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}

:where(.pg-pages-profile) .profile-item .value {
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
}

:where(.pg-pages-profile) .profile-item.full {
    grid-column: 1 / -1;
}

:where(.pg-pages-profile) .profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

:where(.pg-pages-profile) .profile-actions .btn {
    margin-top: 0;
    width: auto;
    flex: 1;
}

/* Адаптив */
@media (max-width: 560px) {
    :where(.pg-pages-profile) .profile-header {
        flex-direction: column;
        text-align: center;
    }
    :where(.pg-pages-profile) .profile-info .muted {
        text-align: center;
    }
    :where(.pg-pages-profile) .profile-grid {
        grid-template-columns: 1fr;
    }
    :where(.pg-pages-profile) .profile-actions {
        flex-direction: column;
    }
}

/* ----- pages/services (pg-pages-services) ----- */
/* ===== Palvelut (пакеты) ===== */
:where(.pg-pages-services) .page-subtitle {
    max-width: 560px;
    line-height: 1.5;
}

/* Аварийный блок */
:where(.pg-pages-services) .urgent-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #fef2f2;
    border: 2px solid #dc2626;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 32px;
}

:where(.pg-pages-services) .urgent-icon {
    font-size: 36px;
    line-height: 1;
    flex-shrink: 0;
}

:where(.pg-pages-services) .urgent-body {
    flex: 1;
}

:where(.pg-pages-services) .urgent-name {
    font-size: 20px;
    font-weight: 700;
    color: #b91c1c;
    margin-bottom: 6px;
}

:where(.pg-pages-services) .urgent-desc {
    margin: 0 0 12px;
    font-size: 14px;
    color: #7f1d1d;
    line-height: 1.5;
}

:where(.pg-pages-services) .urgent-price {
    font-size: 24px;
    font-weight: 700;
    color: #b91c1c;
    margin-bottom: 4px;
}

:where(.pg-pages-services) .urgent-note {
    font-size: 13px;
    color: #991b1b;
}

/* Сетка пакетов */
:where(.pg-pages-services) .packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

:where(.pg-pages-services) .package-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
    transition: all 0.15s ease;
}

:where(.pg-pages-services) .package-card:hover {
    background: #fff;
    border-color: #1e3a5f;
    box-shadow: 0 4px 14px rgba(30, 58, 95, 0.08);
    transform: translateY(-2px);
}

:where(.pg-pages-services) .package-name {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 8px;
}

:where(.pg-pages-services) .package-visits {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
}

:where(.pg-pages-services) .package-price {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
}

/* CTA */
:where(.pg-pages-services) .packages-cta {
    text-align: center;
}

:where(.pg-pages-services) .packages-cta .btn {
    width: auto;
    min-width: 200px;
    margin: 0;
}

/* Адаптив */
@media (max-width: 560px) {
    :where(.pg-pages-services) .urgent-card {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }

    :where(.pg-pages-services) .packages-grid {
        grid-template-columns: 1fr;
    }
}

/* ----- properties/form (pg-properties-form) ----- */
/* ===== Форма (Lisää / Muokkaa) ===== */
:where(.pg-properties-form) .form-header {
    margin-bottom: 8px;
}

:where(.pg-properties-form) .form-header h1 {
    margin: 0 0 4px;
}

:where(.pg-properties-form) .form-subtitle {
    margin: 0 0 24px;
    color: #64748b;
    font-size: 14px;
}


:where(.pg-properties-form) .form-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

:where(.pg-properties-form) .form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 8px;
    padding-bottom: 0;
}

:where(.pg-properties-form) .section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin: 0 0 16px;
}

:where(.pg-properties-form) .form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

:where(.pg-properties-form) .form-group {
    margin-bottom: 0;
}

:where(.pg-properties-form) .form-group.grow {
    flex: 1;
    min-width: 180px;
}

:where(.pg-properties-form) .form-group label {
    margin-top: 0;
}

:where(.pg-properties-form) .hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #94a3b8;
}

:where(.pg-properties-form) .current-photo {
    margin-bottom: 8px;
}

:where(.pg-properties-form) .current-photo img.photo {
    max-width: 220px;
    border-radius: 10px;
}

:where(.pg-properties-form) .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 8px;
}

:where(.pg-properties-form) .form-actions .btn {
    margin-top: 0;
    width: auto;
    min-width: 140px;
}

:where(.pg-properties-form) .form-actions .btn.light {
    background: #e5e7eb;
    color: #1f2937;
}

/* Readonly fields */
:where(.pg-properties-form) input:read-only,
:where(.pg-properties-form) select:disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

/* Адаптив */
@media (max-width: 560px) {
    :where(.pg-properties-form) .form-row {
        flex-direction: column;
    }

    :where(.pg-properties-form) .form-group.mw-140,
    :where(.pg-properties-form) .form-group.mw-120 {
        max-width: none !important;
    }

    :where(.pg-properties-form) .form-actions {
        flex-direction: column;
    }

    :where(.pg-properties-form) .form-actions .btn {
        width: 100%;
    }
}

/* Подсказка «Käytä omaa osoitettani» над формой нового дома */
:where(.pg-properties-form) .address-hint { background-color: #fff8e1; border: 1px solid #ffe082; border-radius: 8px; padding: 14px 16px; color: #5d4037; font-size: 14px; line-height: 1.5; }
:where(.pg-properties-form) .address-hint p { margin: 6px 0 0; color: #795548; }

/* ----- properties/index (pg-properties-index) ----- */
/* ===== Страница списка (Kiinteistöt) ===== */
:where(.pg-properties-index) .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}

:where(.pg-properties-index) .page-header h1 {
    margin: 0 0 4px;
}

:where(.pg-properties-index) .page-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

/* Карточка объекта */
:where(.pg-properties-index) .property-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin-bottom: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}

:where(.pg-properties-index) .property-card:hover {
    background: #fff;
    border-color: #1e3a5f;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.08);
    transform: translateY(-1px);
}

:where(.pg-properties-index) .property-photo {
    flex-shrink: 0;
}

:where(.pg-properties-index) .property-photo img.photo.small,
:where(.pg-properties-index) .property-photo .photo-placeholder.small {
    border-radius: 10px;
}

:where(.pg-properties-index) .property-body {
    flex: 1;
    min-width: 0;
}

:where(.pg-properties-index) .property-address {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

:where(.pg-properties-index) .property-meta {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

:where(.pg-properties-index) .property-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

:where(.pg-properties-index) .package-name {
    color: #475569;
    font-weight: 500;
}

:where(.pg-properties-index) .valid-until {
    color: #64748b;
    font-size: 12px;
}

:where(.pg-properties-index) .property-arrow {
    color: #94a3b8;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}

:where(.pg-properties-index) .property-card:hover .property-arrow {
    color: #1e3a5f;
    transform: translateX(3px);
}

/* Пустое состояние */
:where(.pg-properties-index) .empty-state {
    text-align: center;
    padding: 48px 20px;
}

:where(.pg-properties-index) .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

:where(.pg-properties-index) .empty-state h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #1e293b;
}

:where(.pg-properties-index) .empty-state p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

/* Адаптив */
@media (max-width: 560px) {
    :where(.pg-properties-index) .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    :where(.pg-properties-index) .page-header .btn {
        width: 100% !important;
    }

    :where(.pg-properties-index) .property-card {
        padding: 14px;
        gap: 12px;
    }

    :where(.pg-properties-index) .property-address {
        font-size: 15px;
    }
}

/* ----- properties/show (pg-properties-show) ----- */
/* ===== Страница просмотра объекта ===== */
:where(.pg-properties-show) .show-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

:where(.pg-properties-show) .show-title h1 {
    margin: 0 0 4px;
    font-size: 24px;
}

:where(.pg-properties-show) .show-meta {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

:where(.pg-properties-show) .show-actions {
    flex-shrink: 0;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}

/* Фото + детали */
:where(.pg-properties-show) .show-top {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    margin-bottom: 24px;
}

:where(.pg-properties-show) .show-photo img.photo,
:where(.pg-properties-show) .show-photo .photo-placeholder {
    width: 100%;
    border-radius: 12px;
    margin-top: 0;
}

:where(.pg-properties-show) .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

:where(.pg-properties-show) .detail-item .label,
:where(.pg-properties-show) .notes-block .label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #64748b;
    margin-bottom: 4px;
}

:where(.pg-properties-show) .detail-item .value,
:where(.pg-properties-show) .notes-block .value {
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
}

:where(.pg-properties-show) .notes-block {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

/* Зона удаления */
:where(.pg-properties-show) .danger-zone {
    margin-bottom: 8px;
}

:where(.pg-properties-show) .muted-note {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

/* Секции */
:where(.pg-properties-show) .show-section {
    margin-bottom: 8px;
}

:where(.pg-properties-show) .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

:where(.pg-properties-show) .section-header h2 {
    margin: 0;
    font-size: 18px;
}

/* Карточка статуса пакета */
:where(.pg-properties-show) .status-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
}

:where(.pg-properties-show) .status-card.active {
    border-color: #86efac;
    background: #f0fdf4;
}

/* Valmis — все оплаченные выезды сделаны, срок ещё идёт (синяя, как .badge.completed) */
:where(.pg-properties-show) .status-card.completed {
    border-color: #93c5fd;
    background: #eff6ff;
}

:where(.pg-properties-show) .status-card.pending {
    border-color: #fde68a;
    background: #fffbeb;
}

:where(.pg-properties-show) .status-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

:where(.pg-properties-show) .status-body {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 10px;
}

:where(.pg-properties-show) .status-link {
    font-size: 14px;
    font-weight: 600;
    color: #1e3a5f;
    text-decoration: none;
}

:where(.pg-properties-show) .status-link:hover {
    text-decoration: underline;
}

:where(.pg-properties-show) .empty-block {
    padding: 12px 0;
    color: #64748b;
    font-size: 14px;
}

:where(.pg-properties-show) .empty-block p {
    margin: 0;
}

/* Доп. услуги — каждая группа в отдельной карточке */
:where(.pg-properties-show) .extras-group {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

:where(.pg-properties-show) .extras-group:last-child {
    margin-bottom: 0;
}

:where(.pg-properties-show) .extras-group-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e3a5f;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

:where(.pg-properties-show) .extras-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

:where(.pg-properties-show) .extras-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

:where(.pg-properties-show) .extras-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

:where(.pg-properties-show) .extras-list li:first-child {
    padding-top: 0;
}

:where(.pg-properties-show) .extras-name {
    font-weight: 500;
    color: #1e293b;
    font-size: 15px;
}

/* Метка статуса услуги рядом с названием */
:where(.pg-properties-show) .extras-list .badge {
    margin-left: 6px;
}

:where(.pg-properties-show) .extras-note {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 13px;
}

/* Подсказка, почему нет кнопки «Tilaa lisäpalvelu»
   (доп. услуги доступны только при активном пакете на срок, не при kertakäynti) */
:where(.pg-properties-show) .extras-hint {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #1e3a5f;
    line-height: 1.5;
}

:where(.pg-properties-show) .extras-hint p {
    margin: 0 0 6px;
}

:where(.pg-properties-show) .extras-hint .status-link {
    font-size: 14px;
}

/* Почему нельзя заказать новый пакет на срок и что сделать (Property::termBlockMessage()) */
:where(.pg-properties-show) .term-block-hint {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #92400e;
    line-height: 1.5;
}

/* Фото */
:where(.pg-properties-show) .show-photo {
    width: 100%;
}

:where(.pg-properties-show) .show-photo img.photo {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #e2e8f0;
}

:where(.pg-properties-show) .show-photo .photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
}

/* если в partial есть иконка или текст внутри placeholder */
:where(.pg-properties-show) .show-photo .photo-placeholder svg,
:where(.pg-properties-show) .show-photo .photo-placeholder i {
    width: 40px;
    height: 40px;
    opacity: 0.5;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    :where(.pg-properties-show) .show-header {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }

    :where(.pg-properties-show) .show-title h1 {
        font-size: 20px;
    }

    :where(.pg-properties-show) .show-top {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 20px;
    }

    :where(.pg-properties-show) .show-photo {
        max-width: 280px;
        margin: 0 auto;
    }

    :where(.pg-properties-show) .detail-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    :where(.pg-properties-show) .show-actions {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px !important;
    }

    :where(.pg-properties-show) .show-actions .btn,
    :where(.pg-properties-show) .show-actions form,
    :where(.pg-properties-show) .show-actions .danger-zone {
        width: 100%;
    }

    :where(.pg-properties-show) .show-actions .btn {
        text-align: center;
        justify-content: center;
    }

    :where(.pg-properties-show) .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    :where(.pg-properties-show) .section-header .btn {
        width: 100%;
        text-align: center;
    }

    :where(.pg-properties-show) .status-card {
        padding: 14px 16px;
    }

    :where(.pg-properties-show) .status-top {
        flex-wrap: wrap;
        gap: 8px;
    }

    :where(.pg-properties-show) .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -4px;
    }

    :where(.pg-properties-show) .table-wrap table {
        min-width: 480px;
        font-size: 14px;
    }

    :where(.pg-properties-show) .table-wrap th,
    :where(.pg-properties-show) .table-wrap td {
        padding: 10px 8px;
        white-space: nowrap;
    }

    :where(.pg-properties-show) .extras-group {
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    :where(.pg-properties-show) .show-title h1 {
        font-size: 18px;
    }

    :where(.pg-properties-show) .detail-item .value,
    :where(.pg-properties-show) .notes-block .value {
        font-size: 15px;
    }

    :where(.pg-properties-show) .section-header h2 {
        font-size: 16px;
    }

    :where(.pg-properties-show) .show-photo {
        max-width: 100%;
    }

    /* Метка статуса услуги рядом с названием */
    :where(.pg-properties-show) .extras-list .badge {
        margin-left: 6px;
    }
}

/* ----- Смена пароля: auth/password (pg-password), общая страница всех ролей ----- */
:where(.pg-password) .hint { color: #475569; font-size: 14px; line-height: 1.5; }
:where(.pg-password) .back { text-align: center; margin-top: 16px; font-size: 14px; }
:where(.pg-password) .back a { color: #1e3a5f; }

/* =====================================================================
   4. УТИЛИТЫ (вместо style="..." в шаблонах)
   !important — как у прежнего style="...": значение должно перебить правило класса
   (например, у .btn ширина 100% и отступ сверху, у .muted свой отступ).
   ===================================================================== */
.m-0     { margin: 0 !important; }
.mt-12   { margin-top: 12px !important; }
.mt-24   { margin-top: 24px !important; }
.mt-28   { margin-top: 28px !important; }
.mb-12   { margin-bottom: 12px !important; }
.mb-24   { margin-bottom: 24px !important; }
.mw-120  { max-width: 120px !important; }
.mw-140  { max-width: 140px !important; }
.text-left { text-align: left !important; }
.d-inline  { display: inline !important; }
/* Кнопка по ширине текста, без своего отступа (в строке рядом с заголовком) */
.btn-auto  { width: auto !important; margin: 0 !important; }
/* Кнопка по ширине текста, отступ сверху 16px (пустой список домов) */
.btn-auto-16 { width: auto !important; margin-top: 16px !important; }
/* Строка «слева — справа» */
.row-between { display: flex !important; justify-content: space-between !important; }

/* ----- pages/support — Asiakastuki (pg-pages-support) ----- */
:where(.pg-pages-support) .card { text-align: left; }
:where(.pg-pages-support) h2 { font-size: 17px; margin: 24px 0 8px; }
:where(.pg-pages-support) .support-lead { margin: 0 0 8px; }
:where(.pg-pages-support) .support-email { display: inline-block; font-size: 20px; font-weight: 700; color: #1e3a5f; word-break: break-all; }
:where(.pg-pages-support) .support-time { margin: 8px 0 0; color: #166534; font-size: 14px; }
:where(.pg-pages-support) .support-list { margin: 0 0 8px; padding-left: 22px; line-height: 1.6; }
:where(.pg-pages-support) .support-example { white-space: pre-line; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; font-size: 14px; line-height: 1.5; }
:where(.pg-pages-support) .support-warning { margin: 20px 0 0; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 10px; padding: 12px 14px; font-size: 14px; }

/* «Jatka pakettia»: кнопка продолжения пакета под ссылкой на заказ */
:where(.pg-properties-show) .continue-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 14px;
}
