/* assets/style.css - ПОЛНАЯ ВЕРСИЯ с поддержкой счетчиков, оплаты электроэнергии и документов по оплате */
.snt-pa-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Шапка с заголовком и датой */
.snt-pa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.snt-pa-header h2 {
    color: #1a3a5f;
    border-bottom: 3px solid #e8edf2;
    padding-bottom: 12px;
    margin-bottom: 0;
    font-size: 24px;
    font-weight: 600;
    flex: 1;
}

/* ============================================================
   БЛОК ДАТ В ШАПКЕ — ДВЕ СТРОКИ, ЛЕВО/ПРАВО
   ============================================================ */

.snt-pa-dates-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.snt-pa-dates-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #5a6c7d;
    font-weight: 500;
}

.snt-pa-date-left,
.snt-pa-date-right {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    line-height: 1;
}

.snt-pa-date-right {
    margin-left: auto;
}

.snt-pa-date-icon {
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    /* Нет отступа между иконками — они вплотную */
}

.snt-pa-date-value {
    margin-left: 4px;
    font-variant-numeric: tabular-nums;
    color: #1a3a5f;
    font-weight: 600;
}

.snt-pa-business-text {
    margin-right: 4px;
    color: #5a6c7d;
    font-weight: 500;
}

/* Поисковая форма */
.snt-pa-search-wrapper {
    margin: 20px 0 30px;
}

.snt-pa-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    padding: 20px 25px;
    background: #f7f9fc;
    border-radius: 8px;
    border: 1px solid #e5e9ef;
}

.snt-pa-search-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 200px;
    min-width: 180px;
}

.snt-pa-search-row label {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    letter-spacing: 0.3px;
}

.snt-pa-search-row input,
.snt-pa-search-row select {
    padding: 10px 14px;
    border: 2px solid #dce1e8;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.snt-pa-search-row input:focus,
.snt-pa-search-row select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.snt-pa-search-row input:disabled,
.snt-pa-search-row select:disabled {
    background: #e9ecef;
    cursor: not-allowed;
    opacity: 0.7;
}

.snt-pa-search-row input::placeholder {
    color: #aab2bd;
}

.snt-pa-hint {
    margin-top: 10px;
    padding: 8px 15px;
    background: #f0f4f9;
    border-radius: 6px;
    font-size: 13px;
    color: #5a6c7d;
    border-left: 3px solid #3498db;
}

.snt-pa-hint-warning {
    background: #fff3cd !important;
    border-left-color: #ffc107 !important;
    color: #856404 !important;
}

.snt-pa-button {
    padding: 10px 35px;
    background: #2c7fb8;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    height: 46px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.snt-pa-button:hover:not(:disabled) {
    background: #1a5f8f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 127, 184, 0.3);
}

.snt-pa-button:active:not(:disabled) {
    transform: translateY(0);
}

.snt-pa-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================================
   КНОПКА "ПОДЕЛИТЬСЯ ССЫЛКОЙ"
   ============================================================ */

.snt-pa-share-btn {
    padding: 0 14px;
    background: #ffffff;
    color: #2c7fb8;
    border: 2px solid #2c7fb8;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.2s ease;
    height: 46px;
    min-width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1;
}

.snt-pa-share-btn:hover:not(:disabled) {
    background: #eaf3fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 127, 184, 0.2);
}

.snt-pa-share-btn:active:not(:disabled) {
    transform: translateY(0);
}

.snt-pa-share-btn:disabled {
    opacity: 0.7;
    cursor: default;
    transform: none !important;
    box-shadow: none !important;
}

/* Результаты */
#snt-pa-result {
    margin-top: 25px;
}

.snt-pa-loader {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #e8edf2;
    border-top: 4px solid #2c7fb8;
    border-radius: 50%;
    animation: snt-pa-spin 0.8s linear infinite;
}

@keyframes snt-pa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#snt-pa-loading {
    text-align: center;
    padding: 40px 20px;
}

#snt-pa-loading p {
    margin-top: 15px;
    color: #5a6c7d;
    font-size: 15px;
}

/* Карточка результата */
.snt-pa-result-card {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e9ef;
    overflow: hidden;
    animation: snt-pa-fadeIn 0.4s ease;
}

@keyframes snt-pa-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Информация об участке */
.snt-pa-owner-info {
    padding: 15px 25px;
    background: linear-gradient(135deg, #f8faff 0%, #eef4fa 100%);
    border-bottom: 2px solid #e5e9ef;
    text-align: center;
}

.snt-pa-owner-info .snt-pa-plot-badge {
    display: inline-block;
    padding: 8px 25px;
    background: #2c7fb8;
    color: #ffffff;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ============================================================
   КНОПКИ-ПЕРЕКЛЮЧАТЕЛИ РАЗДЕЛОВ
   ============================================================ */

.snt-pa-section-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 25px;
    background: #fafbfc;
    border-bottom: 1px solid #e5e9ef;
    flex-wrap: wrap;
}

.snt-pa-tab-btn {
    flex: 1 1 auto;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    border: 2px solid #dce1e8;
    color: #5a6c7d;
    text-align: center;
    white-space: nowrap;
}

.snt-pa-tab-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Начисления — фиолетовый */
.snt-pa-tab-accruals {
    border-color: #7b3fb5;
    color: #7b3fb5;
}
.snt-pa-tab-accruals:hover {
    background: #f0e8fa;
}
.snt-pa-tab-accruals.snt-pa-tab-active {
    background: #e5d5f5;
    color: #5a2a8a;
    border-color: #7b3fb5;
    box-shadow: 0 2px 8px rgba(123, 63, 181, 0.35);
}

/* Счетчики — цвет рамки как у блока счетчиков */
.snt-pa-tab-meters {
    border-color: #6c8eb0;
    color: #4a6a8a;
}
.snt-pa-tab-meters:hover {
    background: #eef3f8;
}
.snt-pa-tab-meters.snt-pa-tab-active {
    background: #6c8eb0;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(108, 142, 176, 0.35);
}

/* Платежи — цвет рамки как у блока документов по оплате */
.snt-pa-tab-payments {
    border-color: #d4a017;
    color: #a67c0a;
}
.snt-pa-tab-payments:hover {
    background: #fdf6e0;
}
.snt-pa-tab-payments.snt-pa-tab-active {
    background: #d4a017;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(212, 160, 23, 0.35);
}

/* ============================================================
   БЕЙДЖИ НА КНОПКАХ-ПЕРЕКЛЮЧАТЕЛЯХ
   ============================================================ */

.snt-pa-tab-badge {
    display: inline-block;
    margin-left: 6px;
    font-size: 13px;
    line-height: 1;
    vertical-align: middle;
}

.snt-pa-tab-badge-ok {
    filter: drop-shadow(0 0 2px rgba(0, 163, 42, 0.4));
}

.snt-pa-tab-badge-pay {
    filter: drop-shadow(0 0 2px rgba(255, 140, 0, 0.5));
}

.snt-pa-tab-btn.snt-pa-tab-active .snt-pa-tab-badge {
    filter: none;
}

/* ============================================================
   ОБЩАЯ ОБЁРТКА БЛОКА "НАЧИСЛЕНИЯ"
   ============================================================ */

.snt-pa-accruals-section {
    margin: 20px;
    padding: 20px 0 10px 0;
    background: #f7f3fc;
    border-radius: 6px;
    border: 2px solid #7b3fb5;
}

/* Внутри обёртки убираем боковые отступы у дочерних блоков,
   т.к. padding уже даёт обёртка */
.snt-pa-accruals-section .snt-pa-category,
.snt-pa-accruals-section .snt-pa-totals,
.snt-pa-accruals-section .snt-pa-pay-all-container,
.snt-pa-accruals-section .snt-pa-not-found {
    margin-left: 15px;
    margin-right: 15px;
}

.snt-pa-accruals-section .snt-pa-category:first-child {
    margin-top: 0;
}

/* Категории */
.snt-pa-category {
    margin: 15px 20px;
    padding: 15px 20px;
    background: #fafbfc;
    border-radius: 6px;
    border-left: 4px solid #2c7fb8;
}

.snt-pa-category h4 {
    margin: 0 0 12px 0;
    color: #1a3a5f;
    font-size: 16px;
    font-weight: 600;
}

.snt-pa-category-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

.snt-pa-category-table tr {
    border-bottom: 1px solid #eef2f7;
}

.snt-pa-category-table tr:last-child {
    border-bottom: none;
}

.snt-pa-category-table td {
    padding: 8px 5px;
    vertical-align: middle;
}

.snt-pa-category-table td:first-child {
    color: #4a5a6a;
    width: 60%;
    word-break: break-word;
}

.snt-pa-category-table td:last-child {
    text-align: right;
    font-weight: 600;
    font-size: 15px;
    width: 40%;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Цвета для сумм */
.snt-pa-debt { color: #d63638; }
.snt-pa-overpayment { color: #00a32a; }
.snt-pa-paid { color: #0066cc; font-weight: 600; }
.snt-pa-debt-strong { color: #d63638; font-weight: 700; font-size: 17px; }
.snt-pa-overpayment-strong { color: #00a32a; font-weight: 700; font-size: 17px; }
.snt-pa-paid-total { color: #0066cc; font-weight: 700; font-size: 17px; }

/* Итоги */
.snt-pa-totals {
    margin: 20px;
    padding: 20px;
    background: #eaf3fa;
    border-radius: 6px;
    border: 2px solid #2c7fb8;
}

.snt-pa-totals h4 {
    margin: 0 0 15px 0;
    color: #1a3a5f;
    font-size: 17px;
    font-weight: 600;
}

.snt-pa-totals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

.snt-pa-totals-table tr {
    border-bottom: 1px solid #d4e2ed;
}

.snt-pa-totals-table tr:last-child {
    border-bottom: none;
}

.snt-pa-totals-table td {
    padding: 8px 5px;
    vertical-align: middle;
}

.snt-pa-totals-table td:first-child {
    width: 60%;
    word-break: break-word;
}

.snt-pa-totals-table td:last-child {
    text-align: right;
    font-weight: 600;
    font-size: 16px;
    width: 40%;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Кнопка "Оплатить все" */
.snt-pa-pay-all-container {
    margin: 10px 20px 20px 20px;
    padding: 15px 20px;
    background: #fff8e8;
    border-radius: 6px;
    border: 2px solid #ff8c00;
    text-align: center;
}

.snt-pa-pay-all-container .snt-pa-pay-all-label {
    font-weight: 600;
    font-size: 15px;
    color: #1a3a5f;
    margin-right: 15px;
}

.snt-pa-pay-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 35px;
    background: linear-gradient(135deg, #ff8c00, #e67e00);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
}

.snt-pa-pay-all-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 140, 0, 0.4);
    background: linear-gradient(135deg, #e67e00, #cc6f00);
}

.snt-pa-pay-all-btn:active:not(:disabled) {
    transform: translateY(0);
}

.snt-pa-pay-all-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none !important;
}

/* Кнопка оплаты (обычная) */
.snt-pa-pay-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    background: linear-gradient(135deg, #00a32a, #008a20);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 163, 42, 0.25);
}

.snt-pa-pay-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 163, 42, 0.35);
    background: linear-gradient(135deg, #008a20, #006f1a);
}

.snt-pa-pay-btn:active:not(:disabled) {
    transform: translateY(0);
}

.snt-pa-pay-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none !important;
}

/* ============================================================
   СЕКЦИЯ СЧЕТЧИКОВ - ОПТИМИЗИРОВАННАЯ ДЛЯ МОБИЛЬНЫХ
   ============================================================ */

.snt-pa-meters-section {
    margin: 20px;
    padding: 20px;
    background: #f8faff;
    border-radius: 6px;
    border: 2px solid #6c8eb0;
}

.snt-pa-meters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.snt-pa-meters-header h4 {
    margin: 0;
    color: #1a3a5f;
    font-size: 17px;
    font-weight: 600;
}

.snt-pa-pay-meters-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #ff8c00, #e67e00);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
    white-space: nowrap;
}

.snt-pa-pay-meters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 140, 0, 0.4);
    background: linear-gradient(135deg, #e67e00, #cc6f00);
}

.snt-pa-meters-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.snt-pa-meters-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.snt-pa-meters-table thead tr {
    background: #e8edf2;
}

.snt-pa-meters-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: #1a3a5f;
    border-bottom: 2px solid #dce1e8;
    white-space: nowrap;
}

.snt-pa-meters-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.snt-pa-meters-table tr:hover {
    background: #f0f4f9;
}

.snt-pa-meters-table th:first-child,
.snt-pa-meters-table td:first-child {
    width: 20%;
    min-width: 70px;
}

.snt-pa-meters-table th:nth-child(2),
.snt-pa-meters-table td:nth-child(2) {
    width: 20%;
    min-width: 65px;
    text-align: center;
}

.snt-pa-meters-table th:nth-child(3),
.snt-pa-meters-table td:nth-child(3) {
    width: 30%;
    min-width: 70px;
    text-align: right;
}

.snt-pa-meters-table th:last-child,
.snt-pa-meters-table td:last-child {
    width: 30%;
    min-width: 60px;
    text-align: right;
}

.snt-pa-meters-name {
    font-weight: 600;
    color: #1a3a5f;
    font-size: 13px;
}

.snt-pa-meters-reading {
    font-weight: 600;
    font-size: 15px;
    color: #1a3a5f;
}

.snt-pa-meters-consumption {
    font-weight: 600;
    color: #2c7fb8;
}

.snt-pa-meters-empty {
    margin: 20px;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px dashed #dce1e8;
    font-size: 16px;
    color: #5a6c7d;
}

.snt-pa-meters-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 20px;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e5e9ef;
    margin-bottom: 15px;
}

.snt-pa-meters-summary-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
    padding: 4px 0;
}

.snt-pa-meters-summary-label {
    color: #5a6c7d;
}

.snt-pa-meters-summary-value {
    font-weight: 600;
    color: #1a3a5f;
}

.snt-pa-meters-paid-amount {
    color: #00a32a !important;
}

.snt-pa-meters-pay-container {
    margin-top: 15px;
    text-align: center;
}

.snt-pa-meters-pay-container .snt-pa-pay-meters-btn {
    padding: 10px 30px;
    font-size: 15px;
}

.snt-pa-meters-paid-message {
    margin-top: 15px;
    padding: 12px 16px;
    background: #d4edda;
    border-radius: 6px;
    border: 1px solid #b8daff;
    color: #155724;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
}

.snt-pa-meters-no-consumption {
    margin-top: 15px;
    padding: 12px 16px;
    background: #fff3cd;
    border-radius: 6px;
    border: 1px solid #ffc107;
    color: #856404;
    text-align: center;
    font-size: 14px;
}

.snt-pa-meters-first td {
    background: #fff8e1 !important;
}

.snt-pa-meters-last td {
    background: #e8f0fe !important;
}

.snt-pa-meters-paid {
    border-color: #00a32a !important;
    background: #f0faf0 !important;
}

.snt-pa-meters-paid-badge {
    display: inline-block;
    padding: 4px 16px;
    background: #00a32a;
    color: #ffffff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО ДЛЯ QR-КОДА
   ============================================================ */

.snt-pa-qr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: snt-pa-fadeIn 0.3s ease;
}

.snt-pa-qr-modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 35px;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: snt-pa-slideUp 0.3s ease;
}

@keyframes snt-pa-slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.snt-pa-qr-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    padding: 4px 8px;
}

.snt-pa-qr-modal-close:hover {
    color: #333;
}

.snt-pa-qr-modal-content h3 {
    text-align: center;
    color: #1a3a5f;
    font-size: 22px;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8edf2;
}

.snt-pa-qr-info {
    background: #f7f9fc;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.snt-pa-qr-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #2c3e50;
}

.snt-pa-qr-info p strong {
    color: #1a3a5f;
}

.snt-pa-qr-image-container {
    text-align: center;
    padding: 15px;
    background: #ffffff;
    border: 2px dashed #dce1e8;
    border-radius: 12px;
    margin-bottom: 16px;
}

.snt-pa-qr-image {
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
}

/* Инструкция по оплате */
.snt-pa-qr-instructions {
    background: #f8faff;
    border: 1px solid #e5e9ef;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 16px 0;
}

.snt-pa-qr-instruction-title {
    font-weight: 700;
    font-size: 15px;
    color: #1a3a5f;
    margin-bottom: 10px;
}

.snt-pa-qr-instruction-list {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.8;
    color: #2c3e50;
}

.snt-pa-qr-instruction-list li {
    margin-bottom: 4px;
}

.snt-pa-qr-instruction-list li strong {
    color: #1a3a5f;
}

.snt-pa-qr-warning {
    color: #d63638 !important;
    font-weight: 600;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f0d0d0;
}

.snt-pa-qr-warning strong {
    color: #d63638 !important;
}

.snt-pa-qr-download-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #2c7fb8;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 4px;
}

.snt-pa-qr-download-btn:hover {
    background: #1a5f8f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 127, 184, 0.3);
}

/* ============================================================
   ФОРМА ОПЛАТЫ ЭЛЕКТРОЭНЕРГИИ
   ============================================================ */

.snt-pa-electricity-form {
    padding: 10px 0;
}

.snt-pa-electricity-info {
    background: #f7f9fc;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.snt-pa-electricity-info p {
    margin: 4px 0;
    font-size: 14px;
}

.snt-pa-form-group {
    margin-bottom: 15px;
}

.snt-pa-form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #2c3e50;
}

.snt-pa-form-group input,
.snt-pa-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dce1e8;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.snt-pa-form-group input:focus,
.snt-pa-form-group select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.snt-pa-form-group .snt-pa-hint {
    display: block;
    font-size: 12px;
    color: #7a8a9a;
    margin-top: 4px;
}

.snt-pa-calculation-info {
    background: #eaf3fa;
    padding: 15px 18px;
    border-radius: 6px;
    border: 2px solid #2c7fb8;
    margin: 15px 0;
}

.snt-pa-calculation-info p {
    margin: 6px 0;
    font-size: 14px;
}

#snt-pa-amount {
    font-size: 20px;
}

.snt-pa-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin: 10px 0;
}

.snt-pa-not-found {
    text-align: center;
    padding: 40px 20px;
    color: #5a6c7d;
}

.snt-pa-not-found .snt-pa-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

/* Подсветка блоков категорий */
.snt-pa-category-highlight {
    background: #eaf8ea !important;
    border-left-color: #00a32a !important;
    border-left-width: 5px !important;
    transition: background 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 163, 42, 0.08);
    animation: snt-pa-highlight-fade 0.6s ease;
}

@keyframes snt-pa-highlight-fade {
    0% { background: #d4edda; opacity: 0.6; }
    100% { background: #eaf8ea; opacity: 1; }
}

/* Отрицательная оплата */
.snt-pa-paid-negative {
    color: #d63638;
    font-weight: 600;
}

.snt-pa-paid-total-negative {
    color: #d63638;
    font-weight: 700;
    font-size: 17px;
}

/* Списание переплаты */
.snt-pa-writeoff {
    color: #ff8923;
    font-weight: 600;
}

.snt-pa-writeoff-total {
    color: #ff8923;
    font-weight: 700;
    font-size: 17px;
}

/* Скрываем кнопку оплаты для категории "Электроэнергия" */
.snt-pa-category[data-category="Электроэнергия"] .snt-pa-pay-btn {
    display: none !important;
}

/* ============================================================
   ВЫБОР ТИПА ОПЛАТЫ
   ============================================================ */

.snt-pa-payment-type-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 10px 0;
}

.snt-pa-payment-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 20px;
    border: 2px solid #e5e9ef;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.snt-pa-payment-type-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.snt-pa-payment-type-btn:active {
    transform: translateY(0);
}

.snt-pa-payment-type-meters {
    border-color: #00a32a;
    background: #f0faf0;
}

.snt-pa-payment-type-meters:hover {
    background: #d4edda;
    border-color: #008a20;
}

.snt-pa-payment-type-debt {
    border-color: #ff8c00;
    background: #fff8e8;
}

.snt-pa-payment-type-debt:hover {
    background: #fff3cd;
    border-color: #e67e00;
}

.snt-pa-payment-type-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.snt-pa-payment-type-label {
    font-weight: 700;
    font-size: 16px;
    color: #1a3a5f;
}

.snt-pa-payment-type-desc {
    font-size: 13px;
    color: #5a6c7d;
    margin-top: 2px;
}

/* ============================================================
   ОКНО ДОПЛАТЫ ДОЛГА
   ============================================================ */

.snt-pa-debt-info {
    padding: 5px 0;
}

.snt-pa-debt-input-group {
    margin: 10px 0;
}

.snt-pa-debt-input-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #2c3e50;
}

.snt-pa-debt-input-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dce1e8;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-sizing: border-box;
    color: #1a3a5f;
}

.snt-pa-debt-input-group input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.snt-pa-debt-input-group .snt-pa-hint {
    display: block;
    font-size: 12px;
    color: #7a8a9a;
    margin-top: 4px;
}

.snt-pa-debt-purpose {
    background: #f7f9fc;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 10px 0;
}

.snt-pa-debt-purpose p {
    margin: 4px 0;
    font-size: 14px;
}

.snt-pa-debt-purpose p:first-child {
    font-weight: 600;
    color: #2c3e50;
}

.snt-pa-debt-purpose p:last-child {
    color: #1a3a5f;
    word-break: break-word;
}

/* ============================================================
   РАЗДЕЛ "ДОКУМЕНТЫ ПО ОПЛАТЕ"
   ============================================================ */

.snt-pa-payment-orders-section {
    margin: 20px;
    padding: 20px;
    background: #fffdf5;
    border-radius: 6px;
    border: 2px solid #d4a017;
}

.snt-pa-payment-orders-header {
    margin-bottom: 15px;
}

.snt-pa-payment-orders-header h4 {
    margin: 0;
    color: #1a3a5f;
    font-size: 17px;
    font-weight: 600;
}

.snt-pa-payment-orders-empty {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px dashed #dce1e8;
    font-size: 15px;
    color: #5a6c7d;
}

.snt-pa-payment-orders-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.snt-pa-payment-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

.snt-pa-payment-orders-table thead tr {
    background: #fdf3d8;
}

.snt-pa-payment-orders-table th {
    padding: 10px 6px;
    text-align: left;
    font-weight: 600;
    color: #1a3a5f;
    border-bottom: 2px solid #e6d09a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ширины колонок: Дата / Общая сумма / Сумма / Статья */
.snt-pa-payment-orders-table th:nth-child(1),
.snt-pa-payment-orders-table td:nth-child(1) { width: 22%; }
.snt-pa-payment-orders-table th:nth-child(2),
.snt-pa-payment-orders-table td:nth-child(2) { width: 26%; }
.snt-pa-payment-orders-table th:nth-child(3),
.snt-pa-payment-orders-table td:nth-child(3) { width: 20%; }
.snt-pa-payment-orders-table th:nth-child(4),
.snt-pa-payment-orders-table td:nth-child(4) { width: 32%; }

.snt-pa-payment-orders-table td {
    padding: 10px 6px;
    border-bottom: 1px solid #f0e8d0;
    vertical-align: middle;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.snt-pa-payment-orders-table tr:hover {
    background: #fffaf0;
}

.snt-pa-po-date {
    white-space: nowrap;
    font-weight: 600;
    color: #1a3a5f;
    vertical-align: top;
    font-size: 13px;
}

.snt-pa-po-total {
    white-space: nowrap;
    font-weight: 700;
    color: #d4a017;
    vertical-align: top;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.snt-pa-po-amount {
    white-space: nowrap;
    color: #2c3e50;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}

.snt-pa-po-category {
    color: #2c3e50;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    font-size: 13px;
    line-height: 1.3;
}

/* Двухстрочный заголовок "Общая сумма" только на мобильных */
.snt-pa-th-mobile {
    display: none;
}

.snt-pa-th-desktop {
    display: inline;
}

/* ============================================================
   ВЫБОР СЧЕТЧИКА В ОКНЕ ОПЛАТЫ
   ============================================================ */

.snt-pa-meter-selector {
    margin: 15px 0 10px 0;
    padding: 12px 16px;
    background: #f7f9fc;
    border-radius: 6px;
    border: 1px solid #e5e9ef;
}

.snt-pa-meter-selector label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #2c3e50;
}

.snt-pa-meter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.snt-pa-meter-btn {
    padding: 6px 16px;
    border: 2px solid #dce1e8;
    border-radius: 20px;
    background: #ffffff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.snt-pa-meter-btn:hover {
    border-color: #2c7fb8;
    background: #f0f4f9;
}

.snt-pa-meter-btn.active {
    border-color: #2c7fb8;
    background: #2c7fb8;
    color: #ffffff;
}

/* ============================================================
   ЗЕЛЕНАЯ КНОПКА АВАНСОВОГО ПЛАТЕЖА
   ============================================================ */

.snt-pa-advance-payment-btn {
    padding: 10px 30px;
    background: linear-gradient(135deg, #00a32a, #008a20);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 163, 42, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.snt-pa-advance-payment-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 163, 42, 0.35);
    background: linear-gradient(135deg, #008a20, #006f1a);
}

.snt-pa-advance-payment-btn:active:not(:disabled) {
    transform: translateY(0);
}

.snt-pa-advance-payment-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none !important;
}

/* ============================================================
   ОКНО АВАНСОВОГО ПЛАТЕЖА
   ============================================================ */

.snt-pa-advance-info {
    padding: 5px 0;
}

.snt-pa-advance-info p {
    margin: 4px 0;
}

/* ============================================================
   АДАПТИВ ДЛЯ МОБИЛЬНЫХ
   ============================================================ */

@media (max-width: 992px) {
    .snt-pa-container {
        padding: 15px;
        margin: 10px;
    }

    .snt-pa-search-form {
        padding: 15px 18px;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .snt-pa-container {
        padding: 10px;
        margin: 5px;
        border-radius: 6px;
    }

    .snt-pa-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .snt-pa-header h2 {
        font-size: 20px;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }

    .snt-pa-dates-wrapper {
        align-items: stretch;
        width: 100%;
        gap: 3px;
    }

    .snt-pa-dates-row {
        font-size: 12px;
        gap: 6px;
    }

    .snt-pa-date-icon {
        font-size: 13px;
    }

    .snt-pa-date-value {
        font-size: 12px;
    }

    .snt-pa-business-text {
        font-size: 12px;
    }

    .snt-pa-search-row {
        gap: 4px;
        flex: none;
    }

    .snt-pa-search-row label {
        font-size: 13px;
    }

    .snt-pa-hint {
        font-size: 12px;
        padding: 6px 12px;
        margin-top: 6px;
        border-left-width: 2px;
    }

    .snt-pa-owner-info {
        padding: 12px 15px;
    }

    .snt-pa-owner-info .snt-pa-plot-badge {
        font-size: 14px;
        padding: 6px 18px;
    }

    /* ============================================================
       КНОПКИ-ПЕРЕКЛЮЧАТЕЛИ НА МОБИЛЬНЫХ
       ============================================================ */
    .snt-pa-section-tabs {
        padding: 8px 10px;
        gap: 6px;
    }

    .snt-pa-tab-btn {
        padding: 6px 10px;
        font-size: 12px;
        flex: 1 1 0;
        min-width: 0;
        border-width: 2px;
    }

    .snt-pa-tab-badge {
        margin-left: 4px;
        font-size: 12px;
    }

    /* ============================================================
       ОБЁРТКА "НАЧИСЛЕНИЯ" НА МОБИЛЬНЫХ
       ============================================================ */
    .snt-pa-accruals-section {
        margin: 10px 8px;
        padding: 12px 0 6px 0;
    }

    .snt-pa-accruals-section .snt-pa-category,
    .snt-pa-accruals-section .snt-pa-totals,
    .snt-pa-accruals-section .snt-pa-pay-all-container,
    .snt-pa-accruals-section .snt-pa-not-found {
        margin-left: 8px;
        margin-right: 8px;
    }

    .snt-pa-category {
        margin: 10px 8px;
        padding: 12px 12px;
        border-left-width: 3px;
    }

    .snt-pa-category h4 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .snt-pa-category-table {
        font-size: 13px;
        table-layout: fixed;
    }

    .snt-pa-category-table td {
        padding: 6px 3px;
        font-size: 13px;
    }

    .snt-pa-category-table td:first-child {
        width: 55%;
        font-size: 13px;
    }

    .snt-pa-category-table td:last-child {
        width: 45%;
        font-size: 14px;
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow: visible;
    }

    .snt-pa-totals {
        margin: 10px 8px;
        padding: 12px 12px;
        border-width: 2px;
    }

    .snt-pa-totals h4 {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .snt-pa-totals-table {
        font-size: 13px;
        table-layout: fixed;
    }

    .snt-pa-totals-table td {
        padding: 6px 3px;
        font-size: 13px;
    }

    .snt-pa-totals-table td:first-child {
        width: 55%;
        font-size: 13px;
    }

    .snt-pa-totals-table td:last-child {
        width: 45%;
        font-size: 14px;
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow: visible;
    }

    .snt-pa-debt-strong,
    .snt-pa-overpayment-strong,
    .snt-pa-paid-total {
        font-size: 14px;
    }

    .snt-pa-error {
        font-size: 14px;
        padding: 15px;
    }

    .snt-pa-not-found {
        padding: 25px 15px;
    }

    .snt-pa-not-found .snt-pa-icon {
        font-size: 36px;
        margin-bottom: 10px;
    }

    .snt-pa-pay-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 15px;
    }

    .snt-pa-pay-all-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 15px;
    }

    .snt-pa-pay-all-container {
        margin: 10px 8px 15px 8px;
        padding: 12px 12px;
    }

    .snt-pa-pay-all-container .snt-pa-pay-all-label {
        display: block;
        margin-right: 0;
        margin-bottom: 8px;
        font-size: 14px;
    }

    /* ============================================================
       СЕКЦИЯ СЧЕТЧИКОВ - МОБИЛЬНАЯ ВЕРСИЯ
       ============================================================ */
    .snt-pa-meters-section {
        margin: 10px 8px;
        padding: 12px;
    }

    .snt-pa-meters-header {
        flex-direction: column;
        align-items: stretch;
    }

    .snt-pa-meters-header h4 {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .snt-pa-pay-meters-btn {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 13px;
    }

    .snt-pa-meters-table-wrapper {
        overflow-x: auto;
        margin: 0 -4px;
        padding: 0 4px;
    }

    .snt-pa-meters-table {
        font-size: 13px;
        min-width: 100%;
        width: auto;
        table-layout: fixed;
    }

    .snt-pa-meters-table th,
    .snt-pa-meters-table td {
        padding: 6px 4px;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .snt-pa-meters-table th:first-child,
    .snt-pa-meters-table td:first-child {
        min-width: 55px;
        font-size: 11px;
    }

    .snt-pa-meters-table th:nth-child(2),
    .snt-pa-meters-table td:nth-child(2) {
        min-width: 50px;
    }

    .snt-pa-meters-table th:nth-child(3),
    .snt-pa-meters-table td:nth-child(3) {
        min-width: 55px;
    }

    .snt-pa-meters-table th:last-child,
    .snt-pa-meters-table td:last-child {
        min-width: 50px;
    }

    .snt-pa-meters-name {
        font-size: 11px;
    }

    .snt-pa-meters-reading,
    .snt-pa-meters-consumption {
        font-size: 13px;
    }

    .snt-pa-meters-summary {
        grid-template-columns: 1fr 1fr;
        gap: 4px 12px;
        padding: 10px 12px;
    }

    .snt-pa-meters-summary-item {
        font-size: 13px;
        padding: 3px 0;
    }

    .snt-pa-meters-paid-badge {
        font-size: 12px;
        padding: 3px 12px;
    }

    .snt-pa-meters-pay-container .snt-pa-pay-meters-btn {
        font-size: 14px;
        padding: 10px 20px;
    }

    .snt-pa-meters-paid-message {
        font-size: 14px;
        padding: 10px 14px;
    }

    /* Модальное окно на мобильных */
    .snt-pa-qr-modal-content {
        padding: 20px;
        width: 95%;
        border-radius: 12px;
    }

    .snt-pa-qr-modal-content h3 {
        font-size: 19px;
        margin-bottom: 15px;
    }

    .snt-pa-qr-info p {
        font-size: 13px;
    }

    .snt-pa-qr-image-container {
        padding: 10px;
    }

    .snt-pa-qr-instructions {
        padding: 12px 14px;
        margin: 12px 0;
    }

    .snt-pa-qr-instruction-title {
        font-size: 14px;
    }

    .snt-pa-qr-instruction-list {
        font-size: 13px;
        padding-left: 16px;
        line-height: 1.6;
    }

    .snt-pa-qr-download-btn {
        font-size: 14px;
        padding: 10px;
    }

    .snt-pa-meter-btn {
        padding: 6px 14px;
        font-size: 12px;
    }

    .snt-pa-advance-payment-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 15px;
    }

    /* ============================================================
       РАЗДЕЛ "ДОКУМЕНТЫ ПО ОПЛАТЕ" - МОБИЛЬНАЯ ВЕРСИЯ
       ============================================================ */
    .snt-pa-payment-orders-section {
        margin: 10px 8px;
        padding: 12px;
    }

    .snt-pa-payment-orders-header h4 {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .snt-pa-payment-orders-table {
        font-size: 12px;
    }

    .snt-pa-payment-orders-table th,
    .snt-pa-payment-orders-table td {
        padding: 6px 4px;
        font-size: 12px;
    }

    /* Разрешаем заголовку расти в две строки */
    .snt-pa-payment-orders-table th {
        white-space: normal;
        line-height: 1.15;
        vertical-align: bottom;
    }

    /* Переключаем заголовок "Общая сумма" на двухстрочный */
    .snt-pa-th-desktop {
        display: none;
    }

    .snt-pa-th-mobile {
        display: inline;
    }

    .snt-pa-po-date {
        font-size: 11px;
    }

    .snt-pa-po-total {
        font-size: 12px;
    }

    .snt-pa-po-amount {
        font-size: 11px;
    }

    .snt-pa-po-category {
        font-size: 11px;
    }

    .snt-pa-payment-orders-empty {
        font-size: 13px;
        padding: 15px;
    }

    /* ============================================================
       СЕТКА ФОРМЫ: 6 колонок для гибкого распределения
       ============================================================ */
    .snt-pa-search-form {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 8px;
        align-items: end;
        padding: 12px;
    }

    /* Оба фильтра — по половине ширины (3 из 6 колонок) */
    .snt-pa-search-form .snt-pa-search-row {
        grid-column: span 3;
        min-width: 0;
        width: 100%;
    }

    .snt-pa-search-row input,
    .snt-pa-search-row select {
        font-size: 15px;
        padding: 8px 10px;
        min-height: 38px;
    }

    /* Кнопка "Найти" — по умолчанию на всю ширину (share скрыта) */
    .snt-pa-search-form .snt-pa-button {
        grid-column: span 6;
        width: 100%;
        margin-top: 4px;
        justify-content: center;
        text-align: center;
        height: 44px;
        min-height: 44px;
    }

    /* Поделиться скрыта до поиска */
    .snt-pa-search-form .snt-pa-share-btn {
        display: none;
    }

    /* Когда share показана: Найти 2/3 (4 из 6), Поделиться 1/3 (2 из 6) */
    .snt-pa-search-form.snt-pa-has-share .snt-pa-button {
        grid-column: span 4;
    }

    .snt-pa-search-form.snt-pa-has-share .snt-pa-share-btn {
        grid-column: span 2;
        width: 100%;
        margin-top: 4px;
        height: 44px;
        min-height: 44px;
        min-width: 0;
        padding: 0;
        font-size: 18px;
        display: flex;
    }
}

@media (max-width: 480px) {
    .snt-pa-container {
        padding: 6px;
        margin: 3px;
    }

    .snt-pa-header h2 {
        font-size: 18px;
        padding-bottom: 6px;
        margin-bottom: 10px;
    }

    .snt-pa-dates-row {
        font-size: 11px;
        gap: 4px;
    }

    .snt-pa-date-icon {
        font-size: 12px;
    }

    .snt-pa-date-value {
        font-size: 11px;
    }

    .snt-pa-business-text {
        font-size: 11px;
    }

    .snt-pa-hint {
        font-size: 11px;
        padding: 5px 10px;
        margin-top: 4px;
    }

    .snt-pa-accruals-section {
        margin: 8px 4px;
        padding: 10px 0 4px 0;
    }

    .snt-pa-accruals-section .snt-pa-category,
    .snt-pa-accruals-section .snt-pa-totals,
    .snt-pa-accruals-section .snt-pa-pay-all-container,
    .snt-pa-accruals-section .snt-pa-not-found {
        margin-left: 4px;
        margin-right: 4px;
    }

    .snt-pa-section-tabs {
        padding: 6px 8px;
        gap: 4px;
    }

    .snt-pa-tab-btn {
        padding: 5px 6px;
        font-size: 11px;
    }

    .snt-pa-tab-badge {
        margin-left: 3px;
        font-size: 11px;
    }

    /* ============================================================
       СЕТКА ФОРМЫ НА ОЧЕНЬ УЗКИХ ЭКРАНАХ
       ============================================================ */
    .snt-pa-search-form {
        grid-template-columns: repeat(6, 1fr);
        gap: 6px;
        padding: 8px;
    }

    .snt-pa-search-form .snt-pa-search-row {
        grid-column: span 3;
    }

    .snt-pa-search-row input,
    .snt-pa-search-row select {
        font-size: 14px;
        padding: 6px 8px;
        min-height: 34px;
    }

    .snt-pa-search-row label {
        font-size: 11px;
    }

    .snt-pa-search-form .snt-pa-button {
        grid-column: span 6;
        width: 100%;
        justify-content: center;
        text-align: center;
        height: 40px;
        min-height: 40px;
    }

    .snt-pa-search-form .snt-pa-share-btn {
        display: none;
    }

    .snt-pa-search-form.snt-pa-has-share .snt-pa-button {
        grid-column: span 4;
    }

    .snt-pa-search-form.snt-pa-has-share .snt-pa-share-btn {
        grid-column: span 2;
        width: 100%;
        height: 40px;
        min-height: 40px;
        min-width: 0;
        padding: 0;
        font-size: 16px;
        display: flex;
    }

    .snt-pa-category {
        margin: 8px 4px;
        padding: 10px 8px;
        border-left-width: 3px;
    }

    .snt-pa-category h4 {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .snt-pa-category-table {
        font-size: 12px;
        table-layout: fixed;
    }

    .snt-pa-category-table td {
        padding: 4px 2px;
        font-size: 12px;
    }

    .snt-pa-category-table td:first-child {
        width: 50%;
        font-size: 12px;
    }

    .snt-pa-category-table td:last-child {
        width: 50%;
        font-size: 13px;
        white-space: nowrap !important;
        word-break: keep-all !important;
    }

    .snt-pa-totals {
        margin: 8px 4px;
        padding: 10px 8px;
    }

    .snt-pa-totals h4 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .snt-pa-totals-table {
        font-size: 12px;
        table-layout: fixed;
    }

    .snt-pa-totals-table td {
        padding: 4px 2px;
        font-size: 12px;
    }

    .snt-pa-totals-table td:first-child {
        width: 50%;
        font-size: 12px;
    }

    .snt-pa-totals-table td:last-child {
        width: 50%;
        font-size: 13px;
        white-space: nowrap !important;
        word-break: keep-all !important;
    }

    .snt-pa-debt-strong,
    .snt-pa-overpayment-strong,
    .snt-pa-paid-total {
        font-size: 13px;
    }

    .snt-pa-owner-info .snt-pa-plot-badge {
        font-size: 13px;
        padding: 5px 14px;
    }

    .snt-pa-pay-btn {
        font-size: 13px;
        padding: 10px 16px;
    }

    .snt-pa-pay-all-btn {
        font-size: 13px;
        padding: 12px 16px;
    }

    .snt-pa-pay-all-container {
        margin: 8px 4px 12px 4px;
        padding: 10px 8px;
    }

    .snt-pa-pay-all-container .snt-pa-pay-all-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    /* Счетчики на очень маленьких */
    .snt-pa-meters-section {
        margin: 8px 4px;
        padding: 10px;
    }

    .snt-pa-meters-header h4 {
        font-size: 14px;
    }

    .snt-pa-meters-table {
        font-size: 12px;
    }

    .snt-pa-meters-table th,
    .snt-pa-meters-table td {
        padding: 4px 3px;
        font-size: 10px;
    }

    .snt-pa-meters-table th:first-child,
    .snt-pa-meters-table td:first-child {
        min-width: 40px;
        font-size: 10px;
    }

    .snt-pa-meters-table th:nth-child(2),
    .snt-pa-meters-table td:nth-child(2) {
        min-width: 40px;
    }

    .snt-pa-meters-table th:nth-child(3),
    .snt-pa-meters-table td:nth-child(3) {
        min-width: 45px;
    }

    .snt-pa-meters-table th:last-child,
    .snt-pa-meters-table td:last-child {
        min-width: 40px;
    }

    .snt-pa-meters-name {
        font-size: 10px;
    }

    .snt-pa-meters-reading,
    .snt-pa-meters-consumption {
        font-size: 12px;
    }

    .snt-pa-meters-summary {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 8px 10px;
    }

    .snt-pa-meters-summary-item {
        font-size: 12px;
    }

    .snt-pa-meters-pay-container .snt-pa-pay-meters-btn {
        font-size: 13px;
        padding: 8px 16px;
        width: 100%;
    }

    .snt-pa-meters-paid-message {
        font-size: 13px;
        padding: 8px 12px;
    }

    /* Модальное окно на очень маленьких */
    .snt-pa-qr-modal-content {
        padding: 16px;
        width: 98%;
        border-radius: 10px;
    }

    .snt-pa-qr-modal-content h3 {
        font-size: 17px;
    }

    .snt-pa-qr-info {
        padding: 10px 12px;
    }

    .snt-pa-qr-info p {
        font-size: 12px;
    }

    .snt-pa-qr-instructions {
        padding: 10px 12px;
        margin: 10px 0;
    }

    .snt-pa-qr-instruction-title {
        font-size: 13px;
    }

    .snt-pa-qr-instruction-list {
        font-size: 12px;
        padding-left: 14px;
        line-height: 1.5;
    }

    .snt-pa-qr-download-btn {
        font-size: 13px;
        padding: 8px;
    }

    /* Документы по оплате на очень маленьких */
    .snt-pa-payment-orders-section {
        margin: 8px 4px;
        padding: 10px;
    }

    .snt-pa-payment-orders-header h4 {
        font-size: 14px;
    }

    .snt-pa-payment-orders-table {
        font-size: 11px;
    }

    .snt-pa-payment-orders-table th,
    .snt-pa-payment-orders-table td {
        padding: 5px 3px;
        font-size: 11px;
    }

    .snt-pa-po-date {
        font-size: 10px;
    }

    .snt-pa-po-total {
        font-size: 11px;
    }

    .snt-pa-po-amount {
        font-size: 10px;
    }

    .snt-pa-po-category {
        font-size: 10px;
    }

    .snt-pa-payment-orders-empty {
        font-size: 12px;
        padding: 12px;
    }

    .snt-pa-meter-btn {
        padding: 4px 12px;
        font-size: 12px;
    }

    .snt-pa-meter-selector {
        padding: 10px 12px;
    }

    .snt-pa-advance-payment-btn {
        font-size: 13px;
        padding: 10px 16px;
    }

    .snt-pa-advance-info p {
        font-size: 14px;
    }
}

/* Альбомная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .snt-pa-search-form {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px 15px;
    }

    .snt-pa-search-row {
        flex: 1 1 30%;
        min-width: 120px;
        gap: 3px;
    }

    .snt-pa-search-row input,
    .snt-pa-search-row select {
        padding: 6px 8px;
        font-size: 14px;
        min-height: 32px;
    }

    .snt-pa-button {
        flex: 0 0 auto;
        width: auto;
        min-width: 80px;
        height: 34px;
        font-size: 13px;
        padding: 4px 14px;
    }

    .snt-pa-hint {
        font-size: 11px;
    }

    .snt-pa-category-table td:last-child,
    .snt-pa-totals-table td:last-child {
        white-space: nowrap !important;
    }

    /* Счетчики в альбомной ориентации */
    .snt-pa-meters-header {
        flex-direction: row;
        align-items: center;
    }

    .snt-pa-pay-meters-btn {
        width: auto;
        padding: 6px 16px;
        font-size: 12px;
    }

    .snt-pa-meters-table th,
    .snt-pa-meters-table td {
        padding: 6px 8px;
        font-size: 12px;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) and (min-width: 769px) {
    .snt-pa-category-highlight {
        background: #1a3a1a !important;
        border-left-color: #4caf50 !important;
    }
}