/* ============================================ */
/* ПЕРЕМЕННЫЕ И БАЗА                             */
/* ============================================ */

:root {
    --phoenix-primary: #3874ff;
    --phoenix-primary-hover: #2b5fd9;
    --phoenix-bg: #f5f7fa;
    --phoenix-text: #344050;
    --phoenix-text-muted: #6c757d;
    --phoenix-border: #d8e2ef;
    --phoenix-card-border: #e5e7eb;
    --phoenix-radius: 6px;
    --phoenix-radius-lg: 12px;
    --sidebar-width: 33.333%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--phoenix-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--phoenix-text);
    max-width: 1600px;
    margin: 0 auto;
}

.page-wrapper-phoenix {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.left-column-phoenix {
    width: 380px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.right-column-phoenix {
    flex: 1;
    min-width: 0;
}

/* ============================================ */
/* ТИПОГРАФИКА                                   */
/* ============================================ */

a {
    color: var(--phoenix-primary);
    text-decoration: none;
}

a:hover {
    color: var(--phoenix-primary-hover);
    text-decoration: underline;
}

/* ============================================ */
/* ФОРМЫ И ИНПУТЫ                                */
/* ============================================ */

.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--phoenix-text);
}

.form-control {
    border: 1px solid var(--phoenix-border);
    border-radius: var(--phoenix-radius);
    padding: 8px 12px;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--phoenix-primary);
    box-shadow: 0 0 0 3px rgba(56, 116, 255, 0.15);
}

.form-check-input:checked {
    background-color: var(--phoenix-primary);
    border-color: var(--phoenix-primary);
}

/* ============================================ */
/* КНОПКИ                                        */
/* ============================================ */

.btn-primary {
    background-color: var(--phoenix-primary);
    border-color: var(--phoenix-primary);
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--phoenix-radius);
    font-size: 0.875rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary:hover {
    background-color: var(--phoenix-primary-hover);
    border-color: var(--phoenix-primary-hover);
}

.btn-outline-secondary:hover {
    background-color: #e9ecef;
}

.btn-phoenix-outline-primary {
    background-color: transparent;
    border: 1px solid #3874ff;
    color: #3874ff;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.25s ease-in-out;
    text-decoration: none;
}

.btn-phoenix-outline-primary:hover {
    background-color: #3874ff;
    color: #fff;
    text-decoration: none;
}

/* ============================================ */
/* СТРАНИЦЫ АВТОРИЗАЦИИ                          */
/* ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}

.auth-card {
    max-width: 800px;
    width: 100%;
    margin: 0 16px;
    border: 1px solid var(--phoenix-card-border);
    border-radius: var(--phoenix-radius-lg);
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ============================================ */
/* СТРАНИЦА СЧЁТЧИКА                             */
/* ============================================ */

.page-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.left-column {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.right-column {
    flex: 1;
    min-width: 0;
}

/* ============================================ */
/* ИНФОРМАЦИОННЫЙ БЛОК (БЕЗ РАМКИ, СПЛОШНОЙ)     */
/* ============================================ */

.info-block-phoenix {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f5;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #6c757d;
    font-size: 0.875rem;
    flex-shrink: 0;
    margin-right: 12px;
}

.info-value {
    color: #344050;
    font-weight: 500;
    text-align: right;
}

/* ============================================ */
/* КАРТОЧКИ И БЛОКИ                              */
/* ============================================ */

.card {
    border: 1px solid var(--phoenix-card-border);
    border-radius: var(--phoenix-radius-lg);
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.meter-card {
    transition: box-shadow 0.2s;
}

.meter-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.meter-card .type-badge {
    font-size: 0.85em;
}
/* ============================================ */
/* СПИСОК ТАРИФОВ                                */
/* ============================================ */

.tariff-item {
    border-bottom: 1px solid #eee;
}

.tariff-item:last-child {
    border-bottom: none;
}

.tariff-value {
    font-weight: bold;
}

.tariff-date {
    font-size: 0.85em;
    color: #888;
}

/* ============================================ */
/* ЦЕНТРИРОВАНИЕ ФОРМЫ                           */
/* ============================================ */

.form-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 60vh;
    padding-top: 40px;
}

/* ============================================ */
/* EMPTY STATE                                   */
/* ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

/* ============================================ */
/* АДАПТИВ                                       */
/* ============================================ */

@media (max-width: 992px) {
    .page-wrapper {
        flex-direction: column;
    }
    .left-column {
        width: 100%;
        position: static;
    }
    .right-column {
        width: 100%;
    }
}

/* ============================================ */
/* PHOENIX PRICING CARDS                         */
/* ============================================ */

.pricing-card {
    border: 1px solid var(--phoenix-card-border);
    border-radius: var(--phoenix-radius-lg);
    background: #fff;
    transition: border-color 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
}

.pricing-card:hover {
    border-color: var(--phoenix-primary);
    box-shadow: 0 8px 24px rgba(56, 116, 255, 0.12);
}

.pricing-card-add {
    border-style: dashed;
    border-color: var(--phoenix-border);
    background: #fafbfc;
}

.pricing-card-add:hover {
    border-color: var(--phoenix-primary);
    background: #fff;
}

.pricing-card-body {
    padding: 24px;
}

.icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(56, 116, 255, 0.08);
    color: var(--phoenix-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* ============================================ */
/* PHOENIX PRIMARY BUTTON                        */
/* ============================================ */

.btn-phoenix-primary {
    background-color: #3874ff;
    border: 1px solid #3874ff;
    color: #fff;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

.btn-phoenix-primary:hover {
    background-color: #2b5fd9;
    border-color: #2b5fd9;
    color: #fff;
    text-decoration: none;
    /*box-shadow: 0 4px 12px rgba(56, 116, 255, 0.3);*/
}

.btn-phoenix-outline {
    background-color: transparent;
    border: 1px solid var(--phoenix-primary);
    color: var(--phoenix-primary);
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--phoenix-radius);
    font-size: 0.875rem;
    transition: all 0.25s ease-in-out;
}

.btn-phoenix-outline:hover {
    background-color: var(--phoenix-primary);
    border-color: var(--phoenix-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(56, 116, 255, 0.3);
    transform: translateY(-1px);
}

.btn-phoenix-primary,
.btn-phoenix-outline {
    text-decoration: none;
}

.btn-phoenix-primary:hover,
.btn-phoenix-outline:hover {
    text-decoration: none;
}

/* ============================================ */
/* PHOENIX OUTLINE SECONDARY BUTTON              */
/* ============================================ */

.btn-outline-secondary {
    background-color: transparent !important;
    border: 1px solid #d8e2ef !important;
    color: #344050 !important;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--phoenix-radius);
    font-size: 0.875rem;
    transition: all 0.25s ease-in-out;
    text-decoration: none;
}

.btn-outline-secondary:hover {
    background-color: #1e2a3a !important;
    border-color: #b6c2d4 !important;
    color: #f5f7fa !important;
    text-decoration: none;
}

/* ============================================ */
/* PHOENIX BADGES                                */
/* ============================================ */

.badge-phoenix {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
}

.badge-phoenix-secondary {
    background-color: #f5f7fa;
    color: #344050;
    border: 1px solid #d8e2ef;
}

.badge-phoenix-warning {
    background-color: #fff8e6;
    color: #b57900;
    border: 1px solid #ffe0a3;
}

.badge-phoenix-info {
    background-color: #e6f4ff;
    color: #0070d2;
    border: 1px solid #a3d4ff;
}

.badge-phoenix-danger {
    background-color: #ffe6e8;
    color: #c71c2e;
    border: 1px solid #ffb3b8;
}

/* ============================================ */
/* ГРАФИК                                        */
/* ============================================ */

.chart-container {
    width: 100%;
    height: 350px;
}

/* ============================================ */
/* ТАБЛИЦА HOVERABLE ROWS                       */
/* ============================================ */

.table-hover tbody tr:hover {
    background-color: #f5f7fa;
    cursor: pointer;
}

.table thead th {
    border-bottom: 2px solid #d8e2ef;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table tbody td {
    vertical-align: middle;
    border-bottom: 1px solid #f0f2f5;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #344050;
    font-weight: 700;
    font-size: 0.875rem;
}

.info-value {
    color: #6c757d;
    font-weight: 400;
    font-size: 0.875rem;
    text-align: right;
}

/* ============================================ */
/* PHOENIX TABLE (Project List View)             */
/* ============================================ */

.table-phoenix {
    margin-bottom: 0;
}

.table-phoenix thead th {
    background-color: transparent;
    border-bottom: 2px solid #d8e2ef;
    border-top: none;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #344050;
    padding: 12px 16px;
    white-space: nowrap;
}

.table-phoenix tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f2f5;
    color: #6c757d;
    font-size: 0.875rem;
    background-color: transparent;
}

.table-phoenix tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.table-phoenix tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-phoenix tbody tr:last-child td {
    border-bottom: none;
}

.table-phoenix .text-body {
    color: #344050 !important;
}

/* ============================================ */
/* NAVBAR                                        */
/* ============================================ */

.navbar-phoenix {
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
    height: 60px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.navbar-inner {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.navbar-brand-phoenix {
    font-weight: 700;
    font-size: 1.25rem;
    color: #344050;
    text-decoration: none;
}

.navbar-brand-phoenix:hover {
    color: #344050;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #3874ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
}

.dropdown-menu-phoenix {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 8px 0;
    min-width: 180px;
}

.dropdown-menu-phoenix .dropdown-item {
    padding: 8px 16px;
    font-size: 0.875rem;
    color: #344050;
}

.dropdown-menu-phoenix .dropdown-item:hover {
    background-color: #f5f7fa;
    color: #344050;
}

.dropdown-menu-phoenix .dropdown-item i {
    margin-right: 8px;
    color: #6c757d;
}

.dropdown-menu-phoenix .dropdown-divider {
    margin: 4px 0;
    border-color: #f0f2f5;
}