/* ---------- КАБИНЕТ / ПРОФИЛЬ ---------- */
.cabinet-page { padding: 0 0 10px !important; max-width: 100%; }
.cabinet-title {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 28px; font-weight: bold;
    color: #2c5aa0;
    margin: 0 0 8px; padding-bottom: 6px;
    border-bottom: 2px solid #e3edf9;
}
.cabinet-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(74, 127, 199, 0.08);
    margin-bottom: 6px; overflow: hidden;
    border: 1px solid #e3edf9;
}
.cabinet-section:last-child { margin-bottom: 0 !important; }

.bill-search-form { max-width: 700px; }
.bill-search-form .form-row {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 15px; align-items: center;
    margin-bottom: 15px;
}
.bill-search-form .form-row label { font-weight: 600; color: #4a7fc7; font-size: 14px; margin: 0; }
.bill-search-form .form-control {
    padding: 8px 12px;
    border: 1px solid #cdd9e8;
    border-radius: 5px;
    font-size: 14px; background: #fff;
    width: 100%;
}
.bill-search-form .form-control:focus {
    outline: none; border-color: #4a7fc7;
    box-shadow: 0 0 0 3px rgba(74, 127, 199, 0.1);
}

@media (max-width: 700px) {
    .bill-search-form .form-row { grid-template-columns: 1fr; gap: 5px; }
}

/* Таблица кабинета */
.cabinet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.cabinet-table thead th {
    background: #f0f5fc;
    color: #2c5aa0;
    font-weight: 600;
    text-align: left;
    padding: 12px 15px;
    border-bottom: 2px solid #d4e2f3;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.cabinet-table tbody td {
    padding: 10px 15px;
    border-bottom: 1px solid #eef1f5;
    vertical-align: middle;
}
.cabinet-table tbody tr:nth-child(even) { background: #fafbfd; }
.cabinet-table tbody tr:hover { background: #f0f5fc; }
.cabinet-table .link-forget {
    color: #e74c3c; font-size: 13px;
    text-decoration: underline; cursor: pointer;
}
.cabinet-table .link-forget:hover { color: #c0392b; }
.cabinet-table .text-center { text-align: center; }
.cabinet-table .text-muted { color: #999; padding: 25px; }

/* Профиль */
.profile-page { padding: 10px 0 30px; }
.profile-title {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 28px; font-weight: bold;
    color: #2c5aa0;
    margin: 0 0 20px; padding-bottom: 10px;
    border-bottom: 2px solid #e3edf9;
    display: flex; align-items: center; gap: 10px;
}
.profile-title .glyphicon { color: #4a7fc7; font-size: 24px; }
.profile-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(74, 127, 199, 0.1);
    padding: 30px 35px;
    border-top: 3px solid #4a7fc7;
}
.profile-table { width: 100%; border-collapse: collapse; margin: 0 0 25px; }
.profile-table tr { border-bottom: 1px solid #eef1f5; }
.profile-table tr:last-child { border-bottom: none; }
.profile-table th {
    text-align: left;
    padding: 12px 15px 12px 0;
    font-weight: 600;
    color: #4a7fc7;
    font-size: 14px;
    width: 220px;
    vertical-align: top;
}
.profile-table td { padding: 12px 0; color: #333; font-size: 15px; vertical-align: top; }
.profile-actions {
    display: flex; flex-wrap: wrap; gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #eef1f5;
}
.profile-actions .btn {
    padding: 10px 20px;
    font-size: 14px; font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex; align-items: center; gap: 6px;
    border: 2px solid transparent;
    cursor: pointer;
}
.profile-actions .btn-primary {
    background: linear-gradient(180deg, #4a7fc7, #3a6fb1);
    color: #fff;
    border-color: #3a6fb1;
    box-shadow: 0 2px 6px rgba(74, 127, 199, 0.3);
}
.profile-actions .btn-primary:hover {
    background: linear-gradient(180deg, #5a8fd7, #4a7fc7);
    color: #fff; text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(74, 127, 199, 0.4);
}
.profile-actions .btn-default {
    background: #fff; color: #4a7fc7;
    border-color: #4a7fc7;
}
.profile-actions .btn-default:hover {
    background: #eef4fc; color: #2c5aa0;
    text-decoration: none; transform: translateY(-1px);
}
.profile-actions .btn-danger {
    background: #e74c3c; color: #fff;
    border-color: #c0392b;
}
.profile-actions .btn-danger:hover {
    background: #ec6a5c; color: #fff;
    text-decoration: none; transform: translateY(-1px);
}
.label {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px; font-weight: 600;
    border-radius: 12px;
}
.label-success { background: #d4edda; color: #155724; }
.label-warning { background: #fff3cd; color: #856404; }
@media (max-width: 600px) {
    .profile-card { padding: 20px 18px; }
    .profile-title { font-size: 22px; }
    .profile-table th, .profile-table td { display: block; width: 100%; padding: 6px 0; }
    .profile-table th { color: #6a7a8f; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
}

/* Компактная форма поиска */
.cabinet-latest .section-body { padding: 12px 20px 14px !important; }
.latest-bill-form { max-width: 600px; }
.latest-bill-form .form-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 10px; align-items: center;
    margin-bottom: 5px;
}
.latest-bill-form .form-row label {
    font-weight: 600; color: #4a7fc7;
    font-size: 13px; margin: 0; line-height: 1.2;
}
.latest-bill-form .form-control {
    padding: 5px 10px;
    border: 1px solid #cdd9e8;
    border-radius: 4px;
    font-size: 13px;
    height: 30px;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}
.latest-bill-form .form-control:focus {
    outline: none; border-color: #4a7fc7;
    box-shadow: 0 0 0 2px rgba(74, 127, 199, 0.12);
}
.latest-bill-form .form-row-inline {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    gap: 12px !important;
    margin-left: 210px !important;
    margin-bottom: 14px !important;
}
.latest-bill-form .form-row-inline > .form-row {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    margin: 0 !important;
    width: auto !important;
}
.latest-bill-form .form-row-inline > .form-row > label {
    display: block !important;
    margin: 0 0 3px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #4a7fc7 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}
.latest-bill-form .form-row-inline > .form-row > .form-control {
    padding: 5px 8px !important;
    height: 30px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
    width: auto !important;
}
.latest-bill-form .form-row-inline > .form-row:nth-child(1) > .form-control { width: 120px !important; }
.latest-bill-form .form-row-inline > .form-row:nth-child(2) > .form-control { width: 60px  !important; }
.latest-bill-form .form-row-inline > .form-row:nth-child(3) > .form-control { width: 80px  !important; }
.latest-bill-form .form-actions {
    margin-left: 210px !important;
    margin-top: 2px !important;
    padding-top: 0 !important;
}
.latest-bill-form .form-actions .btn-primary {
    padding: 6px 20px !important;
    font-size: 13px !important;
    height: 30px !important;
    line-height: 1 !important;
    width: auto !important;
    background: linear-gradient(180deg, #5a8fd7, #4a7fc7);
    color: #fff;
    border: 1px solid #3a6fb1;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(74, 127, 199, 0.3);
    transition: all 0.15s;
}
.latest-bill-form .form-actions .btn-primary:hover {
    background: linear-gradient(180deg, #6a9fe7, #5a8fd7);
    transform: translateY(-1px);
}
.latest-bill-form .form-row:last-of-type { margin-bottom: 4px !important; }
@media (max-width: 700px) {
    .latest-bill-form .form-row { grid-template-columns: 1fr; gap: 3px; }
    .latest-bill-form .form-row-inline { margin-left: 0 !important; flex-wrap: wrap; }
    .latest-bill-form .form-row-inline > .form-row:nth-child(1) > .form-control,
    .latest-bill-form .form-row-inline > .form-row:nth-child(2) > .form-control,
    .latest-bill-form .form-row-inline > .form-row:nth-child(3) > .form-control { width: 100% !important; }
    .latest-bill-form .form-actions { margin-left: 0 !important; }
}

/* Восстановление пароля */
.password-reset-page { padding: 20px 0; max-width: 700px; margin: 0 auto; }
.password-reset-page h1 {
    color: #2c3e50;
    border-bottom: 2px solid #b0bec5;
    padding-bottom: 12px;
    margin-bottom: 25px;
    font-size: 24px; font-weight: 600;
    text-align: center;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.password-reset-page h1 i { color: #1976d2; }
.password-reset-page .alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
    display: flex; align-items: center; gap: 10px;
}
.password-reset-page .alert-success {
    background: #d4edda; color: #155724;
    border-left: 4px solid #28a745;
}
.password-reset-page .alert-danger {
    background: #f8d7da; color: #721c24;
    border-left: 4px solid #dc3545;
}
.password-reset-page .alert i { font-size: 20px; }
.reset-form {
    background: #fff;
    padding: 30px 35px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border: 1px solid #e8ecf1;
}
.reset-info {
    color: #546e7a;
    font-size: 15px; line-height: 1.7;
    margin-bottom: 25px;
    text-align: center;
    padding: 15px;
    background: #f5f7fa;
    border-radius: 6px;
}
.reset-form .form-group { margin-bottom: 20px; }
.reset-form label {
    font-weight: 600; color: #2c3e50;
    display: block; margin-bottom: 8px; font-size: 14px;
}
.reset-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.3s;
    background: #fafbfc;
}
.reset-form input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25,118,210,0.1);
    background: #fff;
}
.reset-form .help-block { color: #e74c3c; font-size: 13px; margin-top: 4px; }
.reset-form .has-error input { border-color: #e74c3c; }
.btn-reset {
    width: 100%;
    padding: 13px 24px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-reset:hover {
    background: #0d47a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25,118,210,0.2);
}
.reset-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f2f5;
    text-align: center;
    font-size: 14px;
}
.reset-links a {
    color: #1976d2;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
    transition: all 0.3s;
}
.reset-links a:hover {
    color: #0d47a1;
    text-decoration: none;
    transform: translateX(-3px);
}
@media (max-width: 768px) {
    .password-reset-page { padding: 10px 0; }
    .reset-form { padding: 20px; }
    .password-reset-page h1 { font-size: 20px; }
}
@media (max-width: 480px) {
    .reset-form { padding: 15px; }
    .password-reset-page h1 { font-size: 17px; }
    .btn-reset { font-size: 14px; padding: 11px 20px; }
}

/* Форма редактирования профиля */
.form-section-title {
    color: #2c3e50;
    font-size: 17px; font-weight: 600;
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8ecf1;
    display: flex; align-items: center; gap: 8px;
}
.form-section-title:first-child { margin-top: 0; }
.form-section-title i { color: #1976d2; }
.form-hint {
    color: #78909c;
    font-size: 13px;
    margin-bottom: 15px;
    padding: 10px 14px;
    background: #f0f4f8;
    border-radius: 6px;
    display: flex; align-items: center; gap: 8px;
}
.form-hint i { color: #1976d2; }
.profile-content .form-group { margin-bottom: 18px; }
.profile-content label {
    font-weight: 500; color: #2c3e50;
    display: block; margin-bottom: 6px; font-size: 14px;
}
.profile-content input[type="text"],
.profile-content input[type="email"],
.profile-content input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.3s;
}
.profile-content input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25,118,210,0.1);
}
.profile-content .help-block { color: #e74c3c; font-size: 13px; margin-top: 4px; }
.profile-content .has-error input { border-color: #e74c3c; }
.profile-content .form-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e8ecf1;
    display: flex; gap: 12px; flex-wrap: wrap;
    margin-left: 0;   /* сброс отступа из базового .form-actions */
}

@media (max-width: 768px) {
    .profile-content .form-actions { flex-direction: column; }
    .btn-profile { text-align: center; }
}

.btn-profile {
    display: inline-block;
    padding: 10px 22px;
    background: #1976d2;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}
.btn-profile:hover {
    background: #0d47a1;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}
.btn-profile.btn-save { background: #28a745; cursor: pointer; border: none; }
.btn-profile.btn-save:hover { background: #1e7e34; }
.btn-profile.btn-cancel { background: #6c757d; }
.btn-profile.btn-cancel:hover { background: #495057; }
.btn-profile.btn-logout { background: #e74c3c; }
.btn-profile.btn-logout:hover { background: #c0392b; }
.btn-profile i { margin-right: 6px; }

.form-control-disabled {
    background: #f0f2f5 !important;
    color: #78909c !important;
    cursor: not-allowed !important;
    border-color: #e0e0e0 !important;
}
.form-hint-small {
    font-size: 12px; color: #999; margin-top: 4px;
    display: flex; align-items: center; gap: 5px;
}
.form-hint-small i { color: #f39c12; }

/* Поле пароля с глазиком */
.password-wrapper { position: relative; display: flex; align-items: center; }
.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    width: 100%;
    padding: 10px 45px 10px 14px;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.3s;
}
.password-wrapper input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25,118,210,0.1);
}
.password-toggle {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #78909c;
    cursor: pointer;
    padding: 5px 8px;
    font-size: 16px;
    transition: color 0.3s;
    z-index: 2;
}
.password-toggle:hover { color: #1976d2; }
.password-toggle:focus { outline: none; color: #1976d2; }

/* Signup success */
.signup-success-wrapper {
    display: flex; justify-content: center; align-items: flex-start;
    padding: 40px 20px;
}
.signup-success-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(74, 127, 199, 0.12);
    padding: 45px 40px 35px;
    max-width: 560px; width: 100%;
    text-align: center;
    border-top: 4px solid #4a7fc7;
}
.signup-success-icon {
    display: flex; justify-content: center; margin-bottom: 20px;
    animation: signup-icon-bounce 1.2s ease-in-out;
}
@keyframes signup-icon-bounce {
    0% { transform: scale(0.7); opacity: 0; }
    60% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}
.signup-success-title {
    font-family: "Times New Roman", serif;
    font-size: 28px; font-weight: bold;
    color: #2c5aa0;
    margin: 0 0 12px;
    letter-spacing: 0.5px;
}
.signup-success-subtitle { font-size: 15px; color: #555; margin: 0 0 6px; }
.signup-success-email {
    display: inline-block;
    font-size: 17px; font-weight: bold;
    color: #2c5aa0;
    background: #eef4fc;
    padding: 8px 18px;
    border-radius: 20px;
    margin: 0 0 20px;
    word-break: break-all;
}
.signup-success-text { font-size: 15px; line-height: 1.6; color: #444; margin: 0 0 16px; }
.signup-success-hint {
    font-size: 14px; line-height: 1.6;
    color: #777;
    background: #f8f9fb;
    padding: 12px 18px;
    border-radius: 8px;
    margin: 0 0 28px;
}
.signup-success-hint strong { color: #2c5aa0; }
.signup-success-actions {
    display: flex; justify-content: center;
    gap: 12px; flex-wrap: wrap; margin-bottom: 24px;
}
.btn-signup-primary, .btn-signup-secondary {
    display: inline-block;
    padding: 11px 24px;
    font-size: 15px; font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    font-family: inherit;
}
.btn-signup-primary {
    background: linear-gradient(180deg, #4a7fc7, #3a6fb1);
    color: #fff;
    border-color: #3a6fb1;
    box-shadow: 0 2px 6px rgba(74, 127, 199, 0.3);
}
.btn-signup-primary:hover {
    background: linear-gradient(180deg, #5a8fd7, #4a7fc7);
    color: #fff; text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(74, 127, 199, 0.4);
}
.btn-signup-secondary {
    background: #fff; color: #4a7fc7;
    border-color: #4a7fc7;
}
.btn-signup-secondary:hover {
    background: #eef4fc; color: #2c5aa0;
    transform: translateY(-1px);
}
.signup-success-footer {
    font-size: 13px; color: #888;
    padding-top: 20px;
    border-top: 1px solid #eef1f5;
    line-height: 1.5;
}
.signup-success-footer a { color: #4a7fc7; text-decoration: none; }
.signup-success-footer a:hover { text-decoration: underline; }
@media (max-width: 600px) {
    .signup-success-card { padding: 30px 22px 25px; }
    .signup-success-title { font-size: 22px; }
    .signup-success-actions { flex-direction: column; }
    .btn-signup-primary, .btn-signup-secondary { width: 100%; }
}

/* Табы служб */
.services-tabs {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin: 0 0 12px 0;
    border-bottom: 2px solid #4a7fc7;
    padding-bottom: 0;
}
.services-tabs .service-tab {
    display: inline-block;
    padding: 7px 14px;
    background: #e8eef7;
    color: #2a5d9f;
    border: 1px solid #b8c9e0;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 0.15s;
}
.services-tabs .service-tab:hover { background: #d4e0f2; color: #1a3d6f; }
.services-tabs .service-tab.active {
    background: #4a7fc7; color: #fff;
    border-color: #4a7fc7; font-weight: 600;
}
.services-tabs-bottom { margin: 12px 0; border-bottom: 2px solid #4a7fc7; }
.services-tabs-bottom .service-tab {
    border-radius: 0 0 4px 4px;
    border: 1px solid #b8c9e0;
    border-top: none;
}

/* Сводная таблица услуг */
.services-summary-table { width: auto !important; table-layout: auto !important; }
.services-summary-table th, .services-summary-table td {
    white-space: nowrap !important;
    vertical-align: middle;
}
.services-summary-table th:nth-child(1), .services-summary-table td:nth-child(1) { padding-right: 20px; }
.services-summary-table th:nth-child(2), .services-summary-table td:nth-child(2) { padding-right: 20px; }
.services-summary-table th:nth-child(3), .services-summary-table td:nth-child(3) { padding-right: 20px; text-align: center !important; }
.services-summary-table th:last-child, .services-summary-table td:last-child, .services-summary-table .saldo-cell {
    text-align: right !important;
    white-space: nowrap;
}
.services-summary-table .saldo-positive { color: #c0392b; font-weight: 600; }
.services-summary-table .saldo-zero { color: #27ae60; font-weight: 500; }

/* SERVICE DETAIL — хлебные крошки и шапка */
.service-breadcrumbs {
    font-size: 13px; color: #6a7a8f; margin: 0 0 10px;
}
.service-breadcrumbs a { color: #4a7fc7; text-decoration: none; }
.service-breadcrumbs a:hover { text-decoration: underline; }
.service-breadcrumbs span { color: #2c5aa0; font-weight: 600; }

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    background: #f8fafd;
    border-left: 4px solid #4a7fc7;
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.service-header-title {
    font-size: 14px; color: #2c3e50; line-height: 1.5;
}
.service-header-title strong { color: #2c5aa0; }
.service-header-actions { flex-shrink: 0; }
.service-print-link {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; color: #4a7fc7;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid #4a7fc7;
    border-radius: 4px;
    transition: all 0.2s;
}
.service-print-link:hover {
    background: #eef4fc; color: #2c5aa0; text-decoration: none;
}

/* Таблица начислений */
.charges-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: auto;
}
.charges-table thead th {
    background: #f0f5fc; color: #2c5aa0;
    font-weight: 600; font-size: 12px;
    padding: 8px 10px;
    border-bottom: 2px solid #d4e2f3;
    white-space: nowrap;
    text-align: right;
}
.charges-table thead th.col-period, .charges-table thead th.col-service { text-align: left; }
.charges-table thead th.col-period  { width: 80px; }
.charges-table thead th.col-service { min-width: 160px; }
.charges-table thead th.col-money   { width: 110px; }
.charges-table tbody td {
    padding: 6px 10px;
    border-bottom: 1px solid #eef2f7;
    color: #333;
    white-space: nowrap;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}
.charges-table tbody td.col-period { font-weight: 600; color: #2c5aa0; vertical-align: top; padding-top: 8px; }
.charges-table tbody td.col-service { color: #2c3e50; }
.charges-table tbody td.col-money { text-align: right; }
.charges-table tbody tr.charge-total-row td {
    border-bottom: 2px solid #d4e2f3;
    background: #f8fafd;
}
.charge-total-row td.col-service { font-style: italic; color: #4a7fc7; }
.charges-table .saldo-positive { color: #c0392b; font-weight: 600; }
.charges-table .saldo-zero { color: #27ae60; font-weight: 500; }
.charges-table thead th.col-money,
.charges-table tbody td.col-money,
table.charges-table th.col-money,
table.charges-table td.col-money { text-align: right !important; }
.charges-table thead th.col-period, .charges-table tbody td.col-period,
.charges-table thead th.col-service, .charges-table tbody td.col-service,
table.charges-table th.col-period, table.charges-table td.col-period,
table.charges-table th.col-service, table.charges-table td.col-service {
    text-align: left !important;
}
.charges-table thead th.col-money, .charges-table tbody td.col-money { padding-right: 14px !important; }
.charges-table tbody tr.charge-total-row td.col-money { text-align: right !important; }
.charges-table tbody td.col-money.saldo-positive,
.charges-table tbody td.col-money.saldo-positive strong { color: #c0392b !important; font-weight: 600; }
.charges-table tbody td.col-money.saldo-zero,
.charges-table tbody td.col-money.saldo-zero strong { color: #27ae60 !important; font-weight: 500; }
@media (max-width: 768px) {
    .charges-table { font-size: 12px; }
    .charges-table thead th, .charges-table tbody td { padding: 5px 6px; }
    .charges-table thead th.col-money { width: auto; }
}

/* Аккордеон по годам */
.year-accordion { border-bottom: 1px solid #e8ecf1; }
.year-accordion:last-child { border-bottom: none; }
.year-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #f0f5fc;
    color: #2c5aa0;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    border-left: 4px solid #4a7fc7;
}
.year-header:hover { background: #e3edf9; }
.year-accordion.is-open .year-header {
    background: #4a7fc7; color: #fff;
    border-left-color: #2c5aa0;
}
.year-title { font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.year-toggle { font-size: 14px; opacity: 0.8; }
.year-body { padding: 0; background: #fff; }
.year-accordion + .year-accordion .year-header { border-top: 1px solid #e8ecf1; }

/* Модалка */
.detail-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.detail-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.detail-modal-box {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    max-width: 520px;
    width: calc(100% - 40px);
    max-height: 80vh;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.detail-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(180deg, #4a7fc7, #3a6fb1);
    color: #fff;
    font-weight: 600; font-size: 14px;
}
#payment-modal-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
#payment-modal-close:hover { opacity: 0.8; }
.detail-modal-body { padding: 0; overflow: auto; }
.payment-modal-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.payment-modal-table th, .payment-modal-table td {
    padding: 8px 14px;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
}
.payment-modal-table thead th {
    background: #f0f5fc;
    color: #2c5aa0;
    font-weight: 600; font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.payment-modal-table tbody tr:hover { background: #f8fafd; }
.payment-modal-table tfoot th {
    background: #f0f5fc;
    color: #2c5aa0;
    font-weight: 700;
    border-top: 2px solid #d4e2f3;
    border-bottom: none;
}
.payment-modal-table .text-right { text-align: right !important; }
.payment-modal-table .text-center { text-align: center !important; }
.payment-modal-table .text-muted { color: #999; }

.charges-table .recalc-link,
.charges-table .payment-link,
.charges-table .recalc-link:hover,
.charges-table .payment-link:hover,
.charges-table .recalc-link strong,
.charges-table .payment-link strong,
.charges-table .charge-link,
.charges-table .charge-link:hover,
.charges-table .charge-link strong { text-decoration: none !important; }
.charges-table .charge-link:hover,
.charges-table .recalc-link:hover,
.charges-table .payment-link:hover {
    text-decoration: underline dotted !important;
    color: #2c5aa0;
}
.charges-table .meter-units {
    display: inline-block; margin-left: 6px;
    color: #78909c; font-size: 12px; font-weight: normal;
}
.charges-table .meter-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px; line-height: 1.4;
    padding: 1px 0;
}
.charges-table .meter-no { color: #78909c; font-weight: 600; flex: 0 0 auto; }
.charges-table .meter-date { color: #6a7a8f; flex: 1 1 auto; text-align: left; }
.charges-table .meter-value { font-variant-numeric: tabular-nums; flex: 0 0 auto; text-align: right; }

/* Вулиця — компактный select */
.latest-bill-form #street {
    width: 100%; max-width: 520px;
    height: 30px;
    padding: 4px 10px;
    font-size: 13px;
    font-family: Verdana, Tahoma, Arial, sans-serif;
    border: 1px solid #cdd9e8;
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.latest-bill-form #street:focus {
    outline: none; border-color: #4a7fc7;
    box-shadow: 0 0 0 2px rgba(74, 127, 199, 0.12);
}

/* Платежи */
.payment-intro {
    background: #f8fafd;
    border-left: 4px solid #4a7fc7;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}
.payment-intro h3 {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 16px; font-weight: bold; font-style: italic;
    color: #2c5aa0;
    margin: 0 0 10px; text-align: center;
}
.payment-intro p { font-size: 13px; line-height: 1.6; color: #444; margin: 0 0 8px; }
.payment-intro p:last-child { margin-bottom: 0; }
.payment-current { padding: 15px 0 5px; border-top: 1px solid #eef1f5; text-align: center; }
.payment-current-label { font-size: 13px; color: #6a7a8f; margin-bottom: 6px; }
.payment-current-address { font-size: 16px; font-weight: 600; color: #2c5aa0; margin-bottom: 16px; }
.payment-links {
    list-style: none; padding: 0; margin: 0;
    display: flex; justify-content: center; flex-wrap: wrap; gap: 14px;
}
.payment-links li { margin: 0; }
.btn-pay {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px; border-radius: 6px;
    text-decoration: none; font-size: 14px; font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}
.btn-pay-oschad { background: #fff; color: #007a3d; border-color: #007a3d; }
.btn-pay-oschad:hover {
    background: #e8f5ec; color: #005a2d;
    transform: translateY(-1px); text-decoration: none;
}
.btn-pay-privat { background: #fff; color: #1e5aa5; border-color: #1e5aa5; }
.btn-pay-privat:hover {
    background: #e6f0fa; color: #123f75;
    transform: translateY(-1px); text-decoration: none;
}
.payment-empty {
    padding: 20px; text-align: center;
    color: #888; font-size: 14px;
    background: #fafbfc; border-radius: 6px;
}
.months-filter {
    display: flex; flex-wrap: wrap; gap: 6px 0;
    font-size: 14px; line-height: 1.8;
}
.months-filter a { color: #2a5d9f; text-decoration: none; white-space: nowrap; }
.months-filter a:hover { text-decoration: underline; }
.months-filter a:not(:last-child)::after { content: '·'; color: #999; margin: 0 8px; }
.flash-container { max-width: 100%; margin: 0 0 15px 0; }

.cabinet-latest.flash { box-shadow: 0 0 0 3px rgba(74,127,199,0.4); }
.cabinet-welcome { margin-top: 6px !important; padding: 12px 20px !important; }
.cabinet-welcome h3 { margin: 0 0 6px !important; font-size: 16px !important; }


/* ============================================================
   ПОДСВЕТКА СВЕЖИХ ПОКАЗАНИЙ
============================================================ */

.meter-row-new td {
    background: #fff7e0 !important;
    color: #8a6d3b;
    font-weight: 600;
}
.meter-row-new td:first-child::before {
    content: "● ";
    color: #f0ad4e;
    margin-right: 4px;
}
.meter-pending-icon {
    color: #b76e00;
    margin-right: 4px;
    font-size: 11px;
}

.meter-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px 16px;
    font-size: 12px;
    color: #8a6d3b;
    background: #f8fafd;
    border-top: 1px solid #eef2f7;
}
.meter-legend__dot {
    width: 10px;
    height: 10px;
    background: #f0ad4e;
    border-radius: 50%;
    display: inline-block;
}


/* ============================================================
   Адаптив — показания лічильників
   ============================================================ */

@media (max-width: 700px) {
    .meters-table th.col-meter,
    .meters-table td.col-meter {
        width: 180px;
        min-width: 180px;
    }
    .meters-table th.col-date,
    .meters-table td.col-date {
        width: 80px;
        min-width: 80px;
    }
    .calc-table-wrap { padding: 12px; }
    .calc-table thead th,
    .calc-table tbody td,
    .calc-table tfoot th { padding: 8px 6px; font-size: 12px; }
}
.meters-table thead th.col-date { vertical-align: middle; }

/* ============================================
   Видалення профілю
   ============================================ */

.profile-delete-card {
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e3edf9;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(74, 127, 199, 0.06);
    padding: 30px 35px;
    border-top: 4px solid #c0392b;
}

.profile-delete-warn {
    margin-bottom: 24px;
    padding: 18px 22px;
    background: #fdecea;
    border-left: 4px solid #c0392b;
    border-radius: 6px;
    color: #5c1f18;
}
.profile-delete-warn i {
    color: #c0392b;
    font-size: 26px;
    display: block;
    margin-bottom: 8px;
}
.profile-delete-warn h2 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #a93226;
    font-weight: 700;
}
.profile-delete-warn p {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #5c1f18;
}
.profile-delete-warn p:last-child { margin-bottom: 0; }

.profile-delete-form .form-group { margin-bottom: 18px; }

.profile-delete-form label {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.profile-delete-form .checkbox-group { margin-top: 8px; }
.profile-delete-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
    color: #455a64;
    margin-bottom: 0;
}
.profile-delete-form .checkbox-label input[type="checkbox"] {
    margin: 0;
    width: auto;
}

.profile-delete-form .password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.profile-delete-form .password-wrapper input {
    width: 100%;
    padding: 11px 45px 11px 14px;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.3s;
}
.profile-delete-form .password-wrapper input:focus {
    outline: none;
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}
.profile-delete-form .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #78909c;
    cursor: pointer;
    padding: 5px 8px;
    font-size: 16px;
}
.profile-delete-form .password-toggle:hover { color: #c0392b; }

.profile-delete-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eef1f5;
    flex-wrap: wrap;
}

.profile-delete-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
    border: 1px solid transparent;
}

.profile-delete-actions .btn-secondary {
    background: #fff;
    color: #4a7fc7;
    border-color: #4a7fc7;
}
.profile-delete-actions .btn-secondary:hover {
    background: #eef4fc;
    color: #2c5aa0;
    text-decoration: none;
    transform: translateY(-1px);
}

.profile-delete-actions .btn-danger {
    background: linear-gradient(180deg, #d9534f, #c0392b);
    color: #fff;
    border-color: #a93226;
    box-shadow: 0 2px 6px rgba(192, 57, 43, 0.3);
}
.profile-delete-actions .btn-danger:hover {
    background: linear-gradient(180deg, #e05a55, #cf4438);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(192, 57, 43, 0.4);
}

@media (max-width: 600px) {
    .profile-delete-card { padding: 20px 18px; }
    .profile-delete-warn h2 { font-size: 16px; }
    .profile-delete-actions { flex-direction: column-reverse; }
    .profile-delete-actions .btn { justify-content: center; width: 100%; }
}


/* ============================================
   Знайдені рахунки — кликабельный номер
   ============================================ */
.find-bill-account {
    color: #2c5aa0;
    font-weight: 600;
    text-decoration: none;
    padding: 3px 10px;
    border: 1px solid #cdd9e8;
    border-radius: 4px;
    background: #f8fafd;
    display: inline-block;
    transition: all 0.15s ease;
}
.find-bill-account::after {
    content: " +";
    color: #4a7fc7;
    font-weight: 700;
    margin-left: 2px;
}
.find-bill-account:hover {
    background: #eef4fc;
    border-color: #4a7fc7;
    color: #2c5aa0;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(74, 127, 199, 0.15);
}
.find-bill-account:active {
    transform: translateY(0);
}


/* ============================================================
   Знайдені рахунки — 2 колонки (номер + адрес · ФИО)
   ============================================================ */

table.cabinet-table.find-bill-table {
    width: 100%;
    table-layout: auto;
}

/* Шапка */
table.cabinet-table.find-bill-table thead th {
    text-align: left !important;
    padding: 12px 15px;
    white-space: nowrap;
}

/* Все ячейки — по левому краю */
table.cabinet-table.find-bill-table th,
table.cabinet-table.find-bill-table td {
    text-align: left !important;
    vertical-align: middle;
}

/* Первая колонка (номер) — узкая, не переносится */
table.cabinet-table.find-bill-table th:nth-child(1),
table.cabinet-table.find-bill-table td:nth-child(1) {
    width: 160px;
    white-space: nowrap;
}

/* Вторая колонка (адрес + ФИО) — растягивается, переносится по словам */
table.cabinet-table.find-bill-table th:nth-child(2),
table.cabinet-table.find-bill-table td:nth-child(2) {
    white-space: normal;
    word-break: break-word;
    line-height: 1.55;
}

/* Разделитель между адресом и ФИО */
.find-bill-sep {
    color: #b0bec5;
    margin: 0 6px;
    font-weight: normal;
}

.find-bill-fio {
    color: #2c5aa0;
    font-weight: 700;
    background: #f8fafd;
    padding: 1px 6px;
    border-radius: 3px;
}


/* ============================================
   Старые счёты — кликабельная строка
   ============================================ */
.cabinet-table tbody tr.bill-row {
    cursor: pointer;
    transition: background 0.15s ease;
}
.cabinet-table tbody tr.bill-row:hover {
    background: #e3edf9 !important;
}
.cabinet-table tbody tr.bill-row:hover td:first-child {
    font-weight: 600;
    color: #2c5aa0;
}
.cabinet-table tbody tr.bill-row.bill-row-flash {
    background: #fff7d8 !important;
    animation: bill-row-pulse .6s ease;
}
@keyframes bill-row-pulse {
    0%   { background: #fff7d8; }
    50%  { background: #ffe9a8; }
    100% { background: #fff7d8; }
}

/* ============================================================
   METERS PAGE — ввод/просмотр показаний
   ============================================================ */

.meters-page .section-body { padding: 0; }

.meters-table {
    width: auto;
    min-width: 320px;
    border-collapse: collapse;
    font-size: 13px;
}
.meters-table th.col-date,
.meters-table td.col-date {
    width: 110px;
    min-width: 110px;
    text-align: left;
    font-weight: 600;
    color: #2c5aa0;
    background: #f8fafd;
    padding: 8px 12px;
    border: 1px solid #d8e0eb;
    vertical-align: middle;
}
.meters-table th.col-meter,
.meters-table td.col-meter {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    padding: 8px 12px;
    border: 1px solid #d8e0eb;
    vertical-align: middle;
    text-align: center;
    box-sizing: border-box;
}
.meters-table thead th {
    background: #f0f5fc;
    color: #2c5aa0;
    font-weight: 600;
    font-size: 12px;
    padding: 8px 12px;
    border: 1px solid #d8e0eb;
    text-align: center;
}
.meter-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    text-align: left;
}
.meter-info .meter-placement { color: #2c3e50; font-weight: 600; }
.meter-info .meter-number    { color: #2c3e50; font-weight: 600; }
.meter-info .meter-verify    { color: #78909c; font-size: 11px; }

.meter-input {
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
    padding: 6px 10px;
    border: 1px solid #cdd9e8;
    border-radius: 4px;
    font-size: 14px;
    text-align: right;
    box-sizing: border-box;
}
.meter-input:focus {
    outline: none;
    border-color: #4a7fc7;
    box-shadow: 0 0 0 2px rgba(74,127,199,0.12);
}
.meter-input:disabled {
    background: #f5f7fa;
    color: #999;
    cursor: not-allowed;
}

/* ============================================================
   Кнопки под таблицей (ввод показаний)
   ============================================================ */

.meters-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 14px 20px;
    background: #f8fafd;
    border-top: 1px solid #d8e0eb;
}
.meters-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 22px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

/* Синяя — «Передати показання» */
.meters-actions .btn.btn-primary {
    background: linear-gradient(180deg, #5a8fd7 0%, #4a7fc7 100%);
    color: #fff;
    border: 1px solid #3a6fb1;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(74, 127, 199, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}
.meters-actions .btn.btn-primary:hover {
    background: linear-gradient(180deg, #6a9fe7 0%, #5a8fd7 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(74, 127, 199, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.meters-actions .btn.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(74, 127, 199, 0.35);
}

/* Жёлтые кнопки (мягкие) — «Розрахувати» и «Переглянути всі введені показання» */
.meters-actions .btn.btn-secondary,
.meters-history-toggle .btn.btn-secondary {
    background: linear-gradient(180deg, #fdf4d8 0%, #f8e7ab 100%);
    color: #7a6420;
    border: 1px solid #e6cf7d;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(200, 170, 60, 0.15);
    text-shadow: none;
}
.meters-actions .btn.btn-secondary:hover,
.meters-history-toggle .btn.btn-secondary:hover {
    background: linear-gradient(180deg, #fdf0c8 0%, #f4dc90 100%);
    border-color: #d9bb55;
    color: #6a5617;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(200, 170, 60, 0.22);
}
.meters-actions .btn.btn-secondary:active,
.meters-history-toggle .btn.btn-secondary:active {
    transform: translateY(0);
    box-shadow: inset 0 1px 3px rgba(160, 130, 30, 0.15);
}
.meters-actions .btn.btn-secondary i,
.meters-history-toggle .btn.btn-secondary i {
    color: #a58c3d;
    font-size: 13px;
}

/* Блокировка кнопки во время загрузки */
.meters-actions .btn.is-loading,
.meters-actions .btn[disabled] {
    cursor: wait;
    opacity: 0.9;
    pointer-events: none;
    position: relative;
    overflow: hidden;
}
.meters-actions .btn.is-loading::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.45) 50%,
    transparent 100%);
    animation: btn-shimmer 1.6s linear infinite;
}
@keyframes btn-shimmer {
    to { left: 100%; }
}

.meters-history-toggle {
    padding: 12px 20px;
    text-align: center;
    background: #f8fafd;
    border-top: 1px solid #eef2f7;
}
.meters-history-toggle a {
    color: inherit;
    text-decoration: none;
}

/* ============================================================
   Результат расчёта (общая обёртка)
   ============================================================ */

.calc-all-result {
    margin: 16px 20px 18px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.55;
}
.calc-all-result--ok {
    background: transparent;
    border: none;
    padding: 0;
}
.calc-all-result--err {
    background: #fdecea;
    border: 1px solid #f5c6c0;
    color: #a93226;
    padding: 12px 16px;
}
.calc-all-result--err i {
    color: #c0392b;
    margin-right: 6px;
}
.calc-all-result--partial {
    background: #fef9e7;
    border: 1px solid #f0d999;
    color: #8a6d3b;
    padding: 12px 16px;
}

/* ============================================================
   Спиннер — кольцо + текст + полоса
   ============================================================ */

.calc-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 26px 20px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4fc 100%);
    border: 1px solid #d4e2f3;
    border-radius: 10px;
    animation: calc-loader-fade .25s ease-out;
}
@keyframes calc-loader-fade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.calc-loader__ring {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid #cdd9e8;
    border-top-color: #4a7fc7;
    border-right-color: #6fa0db;
    animation: calc-loader-spin .9s linear infinite;
    box-shadow: 0 0 0 4px rgba(74,127,199,0.06);
}
@keyframes calc-loader-spin {
    to { transform: rotate(360deg); }
}
.calc-loader__text {
    font-size: 14px;
    font-weight: 600;
    color: #2c5aa0;
    letter-spacing: 0.2px;
    text-align: center;
}
.calc-loader__bar {
    position: relative;
    width: 220px;
    max-width: 80%;
    height: 4px;
    background: #e3edf9;
    border-radius: 3px;
    overflow: hidden;
}
.calc-loader__bar > span {
    position: absolute;
    top: 0; left: -30%;
    height: 100%; width: 30%;
    background: linear-gradient(90deg,
    transparent 0%,
    #6fa0db 30%,
    #4a7fc7 50%,
    #6fa0db 70%,
    transparent 100%);
    border-radius: 3px;
    animation: calc-loader-bar 1.4s ease-in-out infinite;
}
@keyframes calc-loader-bar {
    0%   { left: -30%; }
    50%  { left:  50%; }
    100% { left: 100%; }
}
@media (max-width: 480px) {
    .calc-loader__ring { width: 36px; height: 36px; border-width: 3px; }
    .calc-loader__text { font-size: 13px; }
    .calc-loader__bar  { width: 160px; }
}

/* Старый вариант спиннера (для совместимости) */
.calc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 12px;
    font-size: 14px;
    color: #6a7a8f;
    background: #f8fafd;
    border: 1px dashed #cdd9e8;
    border-radius: 6px;
    text-align: center;
}
.calc-loading i { font-size: 18px; color: #4a7fc7; }

/* ============================================================
   Таблица расчёта — как в ЛК Павлоградводоканала
   ============================================================ */

.calc-table-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #e3edf9;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(74, 127, 199, 0.06);
}

.calc-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 14px;
    color: #333;
}

/* Шапка */
.calc-table thead th {
    background: #f5f7fa;
    color: #2c3e50;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    padding: 12px 14px;
    border: 1px solid #e3edf9;
    vertical-align: middle;
}
.calc-table thead th.calc-th-name {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    width: 40%;
}
.calc-table thead th.calc-th-sum {
    background: #eef2f7;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}
.calc-table thead th.calc-th-sub {
    background: #f5f7fa;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    width: 30%;
}

/* Тело */
.calc-table tbody td {
    padding: 11px 16px;
    border: 1px solid #e3edf9;
    font-size: 14px;
    vertical-align: middle;
}
.calc-table tbody td.calc-td-name {
    color: #2c3e50;
    text-align: center;
    width: 40%;
}
.calc-table tbody td.calc-td-sum {
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: #333;
    width: 30%;
}
.calc-table tbody tr:nth-child(odd)  td { background: #f7f9fb; }
.calc-table tbody tr:nth-child(even) td { background: #ffffff; }

/* Футер (Сума до оплати) */
.calc-table tfoot th {
    padding: 13px 16px;
    border: 1px solid #e3edf9;
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    background: #eef2f7;
    vertical-align: middle;
    text-align: center;
}
.calc-table tfoot th.calc-td-name {
    text-align: center;
    width: 40%;
}
.calc-table tfoot th.calc-td-sum {
    text-align: center;
    width: 60%;
    color: #1a3d6f;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.calc-avg-vol {
    color: #78909c;
    font-size: 12px;
    margin-left: 3px;
}

.calc-note {
    max-width: 720px;
    margin: 12px auto 0;
    padding: 0 4px;
    background: transparent;
    color: #27ae60;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    border: none;
}

.site-index .cabinet-title {
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e3edf9;
}


/* ============================================================
   АДАПТИВ КАБИНЕТА — для небольших мониторов
   ============================================================ */

/* 1. Таблица начислений — горизонтальный скролл вместо вылезания */
.cabinet-section > .table-responsive,
.cabinet-section > .charges-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cabinet-section {
    overflow: hidden;
}

.charges-table {
    min-width: 640px;
}

/* 2. Центральная колонка — ограничение по ширине */
.content-center {
    max-width: 100%;
    overflow-x: hidden;
}

/* 3. Уменьшить сайдбары на средних экранах */
@media (max-width: 1400px) {
    .sidebar-left  {
        flex: 0 0 200px !important;
        min-width: 180px !important;
    }
    .sidebar-right {
        flex: 0 0 200px !important;
        min-width: 180px !important;
    }
    .main-content {
        gap: 14px !important;
    }
    .charges-table {
        font-size: 12px;
    }
    .charges-table thead th,
    .charges-table tbody td {
        padding: 5px 8px;
    }
}

/* 4. На 1200px — правый сайдбар убрать, чтобы освободить место */
@media (max-width: 1200px) {
    .sidebar-right {
        display: none !important;
    }
    .sidebar-left  {
        flex: 0 0 180px !important;
        min-width: 160px !important;
    }
    .charges-table {
        font-size: 11.5px;
    }
}

/* 5. На 992px — левый сайдбар НЕ скрываем!
       Его превращаем в горизонтальную полосу (оформление — в header.css).
       Правый сайдбар скрыт. */
@media (max-width: 992px) {
    .sidebar-left {
        display: block !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
    }
    .sidebar-right {
        display: none !important;
    }
    .main-content {
        flex-direction: column !important;
        gap: 12px !important;
    }
    .content-center {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
    }
    .charges-table {
        min-width: 0;
        font-size: 11px;
    }
}

/* ============================================================
   АДАПТИВ — правый сайдбар скрываем на средних экранах
   ============================================================ */

@media (max-width: 1400px) {
    .sidebar-right {
        display: none !important;
    }
    .main-content {
        gap: 16px !important;
    }
}

/* На 992px левый сайдбар оставляем видимым (горизонтальная полоса в header.css) */
@media (max-width: 992px) {
    .sidebar-left {
        display: block !important;
    }
    .main-content {
        flex-direction: column !important;
        gap: 12px !important;
    }
    .content-center {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
    }
}

/* Компактнее таблица на средних экранах */
@media (max-width: 1400px) {
    .charges-table {
        font-size: 12px;
    }
    .charges-table thead th,
    .charges-table tbody td {
        padding: 5px 8px;
    }
    .charges-table {
        min-width: 600px;
    }
    .cabinet-section {
        overflow-x: auto;
    }
}

@media (max-width: 992px) {
    .charges-table {
        font-size: 11px;
    }
    .charges-table {
        min-width: 0;
    }
}

/* ============================================================
   АДАПТИВ ТАБЛИЦЫ НАЧИСЛЕНИЙ — для узких экранов
   ============================================================ */

@media (max-width: 1400px) {
    .content-center {
        padding: 12px 14px !important;
    }

    .charges-table {
        font-size: 11px;
    }
    .charges-table thead th,
    .charges-table tbody td {
        padding: 4px 6px;
    }

    .charges-table thead th.col-period  { width: 60px; }
    .charges-table thead th.col-service { min-width: 130px; }
    .charges-table thead th.col-money   { width: 85px; }

    .charges-table tbody td.col-money {
        font-size: 11px;
    }
}

@media (max-width: 1200px) {
    .content-center {
        padding: 10px 10px !important;
    }

    .charges-table {
        font-size: 10.5px;
    }
    .charges-table thead th,
    .charges-table tbody td {
        padding: 3px 5px;
    }

    .charges-table thead th.col-period  { width: 55px; }
    .charges-table thead th.col-service { min-width: 120px; }
    .charges-table thead th.col-money   { width: 80px; }
}

@media (max-width: 992px) {
    .content-center {
        padding: 8px 8px !important;
    }

    .charges-table {
        font-size: 10px;
    }
    .charges-table thead th,
    .charges-table tbody td {
        padding: 3px 4px;
    }

    .cabinet-section {
        overflow-x: auto;
    }
    .charges-table {
        min-width: 550px;
    }
}

/* ============================================================
   КАБИНЕТ — скрытие сайдбаров на небольших экранах
   ============================================================ */

/* Средние экраны (< 1400px): скрываем правый сайдбар */
@media (max-width: 1400px) {
    body.cabinet-page .sidebar-right {
        display: none !important;
    }
    body.cabinet-page .main-content {
        gap: 16px !important;
    }
}

/* Малые экраны (< 992px): правый скрыт, левый — горизонтальная полоса */
@media (max-width: 992px) {
    body.cabinet-page .sidebar-right {
        display: none !important;
    }
    body.cabinet-page .sidebar-left {
        display: block !important;
    }
    body.cabinet-page .main-content {
        flex-direction: column !important;
        gap: 10px !important;
    }
    body.cabinet-page .content-center {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        padding: 12px 14px !important;
    }
}
