/* ============================================================
   MAIN.CSS - Единые стили для личного кабинета Mr.Next
   ============================================================ */

/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
    --primary-color: #3b596f;
    --primary-hover: #67d386;
    --primary-light: rgba(59, 89, 111, 0.1);
    --primary-dark: #2c3e50;
    --text-color: #2A2A2A;
    --text-muted: #6c757d;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --danger: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    --info: #17a2b8;
    --border-color: rgba(59, 89, 111, 0.08);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.05);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.06);
    --shadow-xl: 0 12px 40px rgba(0,0,0,0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 72px;
    --font-family: 'Roboto', sans-serif;
    --notification-bg: #ffffff;
    --notification-color: var(--text-color);
    --notification-border: rgba(0,0,0,0.06);
}

/* ===== СБРОС И БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: var(--header-height);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
}

a {
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* ===== КОНТЕЙНЕР ===== */
.container-fluid-custom {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 576px) {
    .container-fluid-custom {
        padding: 0 24px;
    }
}

@media (min-width: 992px) {
    .container-fluid-custom {
        padding: 0 40px;
    }
}

@media (min-width: 1400px) {
    .container-fluid-custom {
        padding: 0 60px;
        max-width: 2000px;
    }
}

/* ===== НАВИГАЦИЯ ===== */
.navbar-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    padding: 0;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.navbar-modern .container-fluid-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 8px;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color) !important;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.navbar-brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex: 0 0 auto;
}

.navbar-brand picture,
.footer-brand picture {
    display: inline-flex;
    flex: 0 0 auto;
    line-height: 0;
}

.navbar-brand:hover {
    color: var(--primary-hover) !important;
    transform: translateY(-2px);
}

@media (min-width: 768px) {
    .navbar-brand {
        font-size: 1.4rem;
    }
}

@media (min-width: 992px) {
    .navbar-brand {
        font-size: 1.6rem;
    }
    .navbar-brand-logo {
        width: 46px;
        height: 46px;
    }
}

/* ===== ДЕСКТОПНОЕ МЕНЮ ===== */
.navbar-nav-desktop {
    display: none;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: nowrap;
}

@media (min-width: 992px) {
    .navbar-nav-desktop {
        display: flex;
    }
}

.navbar-nav-desktop .nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-color) !important;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-nav-desktop .nav-link i {
    font-size: 0.9rem;
}

.navbar-nav-desktop .nav-link:hover {
    background: var(--primary-hover);
    color: white !important;
    transform: translateY(-2px);
}

.navbar-nav-desktop .nav-link.active {
    background: var(--primary-color);
    color: white !important;
}

/* ===== ТОГГЛЕР ===== */
.navbar-toggler {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 1.4rem;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.navbar-toggler:hover {
    background: var(--primary-light);
}

@media (min-width: 992px) {
    .navbar-toggler {
        display: none;
    }
}

/* ===== ПОЛЬЗОВАТЕЛЬСКОЕ МЕНЮ ===== */
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.user-menu .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: var(--transition);
    cursor: default;
}

.user-menu .user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 89, 111, 0.3);
}

@media (min-width: 992px) {
    .user-menu .user-avatar {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

.user-menu .user-info {
    display: none;
    line-height: 1.3;
    text-align: right;
}

@media (min-width: 768px) {
    .user-menu .user-info {
        display: block;
    }
}

.user-menu .user-info .user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.user-menu .user-info .user-balance {
    font-size: 0.8rem;
    font-weight: 500;
}

.user-menu .btn-logout {
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--danger);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-menu .btn-logout:hover {
    background: rgba(220, 53, 69, 0.1);
}

.user-menu .btn-auth {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.user-menu .btn-auth.btn-login {
    background: var(--primary-color);
    color: var(--white);
}

.user-menu .btn-auth.btn-login:hover {
    background: var(--primary-hover);
}

.user-menu .btn-auth.btn-register {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.user-menu .btn-auth.btn-register:hover {
    background: var(--primary-color);
    color: var(--white);
}

@media (min-width: 992px) {
    .user-menu .btn-auth {
        padding: 8px 22px;
        font-size: 0.95rem;
    }
}

/* ===== МОБИЛЬНОЕ МЕНЮ ===== */
.navbar-collapse-mobile {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 1040;
    display: block !important;
    visibility: hidden;
}

.navbar-collapse-mobile.show {
    transform: translateX(0);
    visibility: visible;
}

@media (min-width: 992px) {
    .navbar-collapse-mobile {
        display: none !important;
    }
}

.navbar-collapse-mobile .navbar-nav-mobile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.navbar-collapse-mobile .navbar-nav-mobile .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.navbar-collapse-mobile .navbar-nav-mobile .nav-link:hover {
    background: var(--primary-light);
}

.navbar-collapse-mobile .navbar-nav-mobile .nav-link.active {
    background: var(--primary-color);
    color: var(--white);
}

.navbar-collapse-mobile .navbar-nav-mobile .nav-link i {
    width: 28px;
    text-align: center;
    font-size: 1.2rem;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ===== */
main {
    padding: 20px 0 30px;
    min-height: calc(100vh - var(--header-height));
}

@media (min-width: 768px) {
    main {
        padding: 24px 0 36px;
    }
}

@media (min-width: 992px) {
    main {
        padding: 32px 0 48px;
    }
}

/* ===== ЗАГОЛОВОК СТРАНИЦЫ ===== */
.page-header {
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .page-header {
        margin-bottom: 28px;
    }
}

@media (min-width: 992px) {
    .page-header {
        margin-bottom: 36px;
    }
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

@media (min-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
}

@media (min-width: 992px) {
    .page-header h1 {
        font-size: 2.4rem;
    }
}

.page-header hr {
    width: 50px;
    height: 3px;
    background: var(--primary-hover);
    border: none;
    margin: 8px 0 0;
}

@media (min-width: 768px) {
    .page-header hr {
        width: 60px;
        margin: 10px 0 0;
    }
}

@media (min-width: 992px) {
    .page-header hr {
        width: 80px;
        margin: 12px 0 0;
    }
}

/* ===== КАРТОЧКИ ===== */
.card-custom {
    background: var(--white);
    border: none;
    border-radius: var(--border-radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
}

@media (min-width: 768px) {
    .card-custom {
        padding: 24px;
        border-radius: 18px;
        box-shadow: var(--shadow-lg);
    }
}

@media (min-width: 992px) {
    .card-custom {
        padding: 28px;
        border-radius: var(--border-radius-xl);
        box-shadow: var(--shadow-lg);
    }
    .card-custom:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-xl);
    }
}

/* ===== ЗАГОЛОВКИ КАРТОЧЕК ===== */
.card-header-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .card-header-custom {
        gap: 12px;
        padding-bottom: 16px;
        margin-bottom: 20px;
    }
}

@media (min-width: 992px) {
    .card-header-custom {
        gap: 14px;
        padding-bottom: 18px;
        margin-bottom: 24px;
    }
}

.card-header-custom i {
    font-size: 1.3rem;
    color: var(--primary-hover);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .card-header-custom i {
        font-size: 1.5rem;
    }
}

@media (min-width: 992px) {
    .card-header-custom i {
        font-size: 1.7rem;
    }
}

.card-header-custom h3,
.card-header-custom .card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

@media (min-width: 768px) {
    .card-header-custom h3,
    .card-header-custom .card-title {
        font-size: 1.2rem;
    }
}

@media (min-width: 992px) {
    .card-header-custom h3,
    .card-header-custom .card-title {
        font-size: 1.4rem;
    }
}

.card-header-custom .ms-auto {
    margin-left: auto;
}

.card-header-custom.justify-content-center {
    justify-content: center;
}

/* ===== БЕЙДЖИ ===== */
.badge {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

@media (min-width: 768px) {
    .badge {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
}

@media (min-width: 992px) {
    .badge {
        font-size: 0.8rem;
        padding: 6px 14px;
    }
}

.badge-gigabit {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    color: var(--white);
}

.badge-combo {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: var(--white);
}

/* ===== СТАТУСЫ ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .status-badge {
        padding: 5px 14px;
        font-size: 0.8rem;
    }
}

@media (min-width: 992px) {
    .status-badge {
        padding: 6px 16px;
        font-size: 0.85rem;
    }
}

.status-active {
    background: rgba(103, 211, 134, 0.15);
    color: var(--primary-hover);
}

.status-blocked {
    background: rgba(220, 53, 69, 0.15);
    color: var(--danger);
}

.status-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
}

.status-info {
    background: rgba(23, 162, 184, 0.15);
    color: var(--info);
}

/* ===== СКОРОСТЬ ===== */
.speed-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-light);
    border-radius: 14px;
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 500;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .speed-badge {
        padding: 4px 12px;
        font-size: 0.8rem;
    }
}

@media (min-width: 992px) {
    .speed-badge {
        padding: 5px 14px;
        font-size: 0.85rem;
    }
}

/* ===== IP АДРЕСА ===== */
.ip-address-card {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 6px 10px;
    margin-bottom: 4px;
    border-left: 3px solid var(--primary-hover);
}

@media (min-width: 768px) {
    .ip-address-card {
        padding: 8px 12px;
        border-radius: 10px;
        margin-bottom: 6px;
    }
}

@media (min-width: 992px) {
    .ip-address-card {
        padding: 10px 14px;
        border-radius: 12px;
        margin-bottom: 8px;
    }
}

.ip-address-card:last-child {
    margin-bottom: 0;
}

.ip-address {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.ip-value {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
}

@media (min-width: 768px) {
    .ip-value {
        padding: 3px 10px;
        font-size: 0.85rem;
    }
}

@media (min-width: 992px) {
    .ip-value {
        padding: 3px 12px;
        font-size: 0.9rem;
    }
}

.ip-mask {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
}

.ip-mac {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed #dee2e6;
    font-size: 0.7rem;
}

@media (min-width: 768px) {
    .ip-mac {
        margin-top: 6px;
        padding-top: 6px;
        font-size: 0.75rem;
    }
}

.mac-value {
    font-family: 'Monaco', 'Menlo', monospace;
    color: var(--text-muted);
}

/* ===== БАЛАНС ===== */
.balance-positive {
    color: var(--primary-hover);
    font-weight: 700;
}

.balance-negative {
    color: var(--danger);
    font-weight: 700;
}

/* ===== КНОПКИ ===== */
.btn {
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: 10px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
}

@media (min-width: 768px) {
    .btn {
        font-size: 0.9rem;
        padding: 10px 22px;
        border-radius: 12px;
    }
}

@media (min-width: 992px) {
    .btn {
        font-size: 0.95rem;
        padding: 12px 26px;
    }
}

.btn-sm {
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 8px;
}

@media (min-width: 768px) {
    .btn-sm {
        font-size: 0.8rem;
        padding: 6px 14px;
        border-radius: 10px;
    }
}

@media (min-width: 992px) {
    .btn-sm {
        font-size: 0.85rem;
        padding: 8px 18px;
    }
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(103, 211, 134, 0.3);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #c82333;
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid var(--danger);
    color: var(--danger);
}

.btn-outline-danger:hover {
    background: var(--danger);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #218838;
    color: var(--white);
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning);
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: var(--white);
}

.btn-secondary:hover {
    background: #5a6268;
    color: var(--white);
    transform: translateY(-2px);
}

.btn-light {
    background: var(--white);
    color: var(--primary-color);
}

.btn-light:hover {
    background: var(--light-bg);
    transform: translateY(-2px);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background: #e9ecef;
    border-color: #e9ecef;
    color: #8a8f94;
    box-shadow: none;
}

/* ===== ТАБЛИЦЫ ===== */
.table-responsive {
    margin: 0 -4px;
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .table-responsive {
        margin: 0;
    }
}

.table {
    font-size: 0.9rem;
    margin-bottom: 0;
    width: 100%;
    border-collapse: collapse;
}

@media (min-width: 768px) {
    .table {
        font-size: 0.95rem;
    }
}

@media (min-width: 992px) {
    .table {
        font-size: 1rem;
    }
}

.table thead th {
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    padding: 10px 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    background: transparent;
}

@media (min-width: 768px) {
    .table thead th {
        padding: 12px 12px;
        font-size: 0.85rem;
    }
}

@media (min-width: 992px) {
    .table thead th {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
}

.table td {
    padding: 10px 10px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .table td {
        padding: 12px 12px;
    }
}

@media (min-width: 992px) {
    .table td {
        padding: 14px 16px;
    }
}

.table-hover tbody tr:hover {
    background: var(--light-bg);
}

.table-borderless td,
.table-borderless th {
    border: none;
}

.table-sm td,
.table-sm th {
    padding: 6px 8px;
    font-size: 0.85rem;
}

/* ===== АЛЕРТЫ ===== */
.alert {
    border-radius: var(--border-radius);
    padding: 16px 20px;
    border: none;
}

.alert-success {
    background: rgba(103, 211, 134, 0.1);
    border-left: 4px solid var(--primary-hover);
    color: var(--text-color);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-left: 4px solid var(--danger);
    color: var(--text-color);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid var(--warning);
    color: var(--text-color);
}

.confirm-modal-warning {
    background: #fff8e1 !important;
    border: 1px solid #f0c36d !important;
    border-left: 5px solid var(--warning, #ffc107) !important;
    box-shadow: 0 4px 14px rgba(133, 100, 4, 0.08);
    color: #5f4700 !important;
    padding: 14px 16px;
}

.alert-info {
    background: rgba(59, 89, 111, 0.1);
    border-left: 4px solid var(--primary-color);
    color: var(--text-color);
}

/* ===== ФОРМЫ ===== */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 3px rgba(103, 211, 134, 0.2);
}

.form-control-lg {
    padding: 12px 18px;
    font-size: 1.1rem;
}

.form-control-sm {
    padding: 6px 10px;
    font-size: 0.85rem;
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-text {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal-content {
    border-radius: var(--border-radius-xl);
    border: none;
    overflow: hidden;
}

#confirmModal .modal-content {
    border: 1px solid rgba(59, 89, 111, 0.28) !important;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(255,255,255,0.85) inset;
}

#confirmModal .modal-dialog {
    filter: drop-shadow(0 8px 22px rgba(15, 23, 42, 0.22));
}

.modal-header {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 16px 24px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
}

/* ===== ФУТЕР ===== */
.footer-modern {
    background: var(--white);
    padding: 28px 0;
    margin-top: 30px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border-color);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-color);
    font-size: 1.15rem;
    font-weight: 700;
}

.footer-brand:hover {
    color: var(--primary-hover);
}

.footer-brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex: 0 0 auto;
}

.footer-scroll-top {
    width: 42px;
    min-width: 42px;
    height: 42px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--light-bg);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-scroll-top:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-content {
    display: grid;
    grid-template-columns: minmax(320px, 1.7fr) minmax(220px, 1fr) minmax(110px, 0.5fr);
    gap: 28px;
    align-items: start;
}

.footer-title {
    margin: 0 0 12px;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 700;
}

.footer-nav,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-nav a,
.footer-menu a,
.footer-contact-item {
    color: var(--text-muted);
    line-height: 1.35;
}

.footer-nav a:hover,
.footer-menu a:hover,
.footer-contact-item:hover {
    color: var(--primary-hover);
}

.footer-menu-wrap {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 10px 24px;
}

.footer-menu {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.footer-contact-item i {
    width: 16px;
    color: var(--primary-hover);
    text-align: center;
}

.footer-support {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.footer-support-title {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 700;
}

.footer-address {
    margin: 4px 0 0;
    color: var(--text-muted);
    line-height: 1.45;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.footer-social a:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
    line-height: 1.45;
}

.footer-bottom span {
    white-space: nowrap;
}

@media (min-width: 768px) {
    .footer-modern {
        padding: 34px 0;
        margin-top: 40px;
        font-size: 0.9rem;
    }
}

@media (min-width: 992px) {
    .footer-modern {
        padding: 40px 0;
        margin-top: 48px;
        font-size: 0.95rem;
    }
}

@media (max-width: 1199.98px) {
    .footer-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .page-main-account_block,
    .page-main-login {
        min-height: auto;
    }

    .footer-modern {
        padding: 24px 0;
        margin-top: 0;
    }

    .footer-top,
    .footer-bottom {
        align-items: flex-start;
    }

    .footer-content,
    .footer-menu-wrap {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

/* ===== УТИЛИТЫ ===== */
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-muted) !important; }

.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ===== ТЕМНАЯ ТЕМА ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #1a1a2e;
        --text-color: #e8e8e8;
        --white: rgba(255,255,255,0.04);
        --border-color: rgba(255,255,255,0.08);
        --text-muted: #8a8a9a;
    }

    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }

    .navbar-modern {
        background: rgba(26, 26, 46, 0.98);
    }

    .card-custom {
        background: rgba(255,255,255,0.04);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255,255,255,0.06);
    }

    .card-header-custom {
        border-bottom-color: rgba(255,255,255,0.08);
    }

    .table thead th {
        color: var(--text-muted);
    }

    .table td {
        border-bottom-color: rgba(255,255,255,0.05);
        color: #d0d0d0;
    }

    .table-hover tbody tr:hover {
        background: rgba(255,255,255,0.04);
    }

    .ip-address-card {
        background: rgba(255,255,255,0.05);
    }

    .ip-value {
        background: rgba(255,255,255,0.08);
        color: #d0d0d0;
    }

    .ip-mac {
        border-top-color: rgba(255,255,255,0.06);
    }

    .footer-modern {
        background: rgba(255,255,255,0.04);
        border-top-color: rgba(255,255,255,0.06);
    }

    .navbar-collapse-mobile {
        background: rgba(26, 26, 46, 0.98);
    }

    .navbar-collapse-mobile .navbar-nav-mobile .nav-link {
        color: #d0d0d0;
    }

    .navbar-collapse-mobile .navbar-nav-mobile .nav-link:hover {
        background: rgba(255,255,255,0.06);
    }

    .user-menu .user-info .user-name {
        color: #d0d0d0;
    }

    .form-control {
        background: rgba(255,255,255,0.05);
        border-color: rgba(255,255,255,0.1);
        color: #d0d0d0;
    }

    .form-control:focus {
        border-color: var(--primary-hover);
        background: rgba(255,255,255,0.08);
        color: var(--text-color);
        caret-color: var(--text-color);
    }

    .form-control[readonly] {
        background: rgba(255,255,255,0.03);
    }

    .form-label {
        color: #d0d0d0;
    }

    .alert-success {
        background: rgba(103, 211, 134, 0.08);
    }

    .alert-danger {
        background: rgba(220, 53, 69, 0.08);
    }

    .alert-warning {
        background: rgba(255, 193, 7, 0.08);
    }

    .confirm-modal-warning {
        background: rgba(255, 193, 7, 0.12) !important;
        border-color: rgba(255, 193, 7, 0.38) !important;
        border-left-color: #ffc107 !important;
        box-shadow: 0 4px 16px rgba(0,0,0,0.22);
        color: #ffe6a3 !important;
    }

    .alert-info {
        background: rgba(59, 89, 111, 0.15);
    }

    .modal-content {
        background: #1a1a2e;
    }

    #confirmModal .modal-content {
        border-color: rgba(120, 174, 202, 0.38) !important;
        box-shadow: 0 18px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08) inset;
    }

    .modal-footer {
        background: rgba(255,255,255,0.02);
    }

    .btn-light {
        background: rgba(255,255,255,0.1);
        color: #d0d0d0;
    }

    .btn-light:hover {
        background: rgba(255,255,255,0.15);
        color: var(--white);
    }

    .page-header h1 {
        color: #d0d0d0;
    }

    .card-header-custom h3,
    .card-header-custom .card-title {
        color: #d0d0d0;
    }

    .status-badge.status-active {
        background: rgba(103, 211, 134, 0.12);
    }

    .status-badge.status-blocked {
        background: rgba(220, 53, 69, 0.12);
    }

    .speed-badge {
        background: rgba(255,255,255,0.08);
        color: #d0d0d0;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #78aeca;
        --primary-light: rgba(120, 174, 202, 0.16);
        --text-color: #f2f6fb;
        --text-muted: #b7c1d0;
        --light-bg: rgba(255,255,255,0.075);
        --white: #242b45;
        --border-color: rgba(255,255,255,0.13);
        --shadow-md: 0 4px 18px rgba(0,0,0,0.22);
        --shadow-lg: 0 8px 30px rgba(0,0,0,0.26);
        --shadow-xl: 0 14px 42px rgba(0,0,0,0.32);
    }

    body {
        color: var(--text-color);
    }

    .navbar-brand,
    .footer-brand,
    .footer-title,
    .footer-support-title {
        color: #9fcfe5 !important;
    }

    .navbar-brand-logo,
    .footer-brand-logo {
        filter: none;
    }

    .navbar-nav-desktop .nav-link {
        color: #eef4fb !important;
    }

    .navbar-nav-desktop .nav-link.active,
    .navbar-nav-desktop .nav-link:hover {
        background: #466f88;
        color: #ffffff !important;
    }

    .card-custom,
    .modal-content,
    .accordion-item,
    .custom-notification {
        background: #242b45;
        color: var(--text-color);
        border: 1px solid var(--border-color);
    }

    .card-header-custom h3,
    .card-header-custom .card-title,
    h5[style*="var(--primary-color)"],
    strong[style*="var(--primary-color)"],
    td[style*="var(--primary-color)"],
    th[style*="var(--primary-color)"],
    div[style*="var(--primary-color)"],
    i[style*="var(--primary-color)"] {
        color: #9fcfe5 !important;
    }

    .bg-light,
    .table-light,
    .table-light > th,
    .table-light > td {
        background-color: rgba(255,255,255,0.075) !important;
        color: var(--text-color) !important;
    }

    .table,
    .table > :not(caption) > * > * {
        --bs-table-bg: transparent;
        --bs-table-color: var(--text-color);
        --bs-table-border-color: var(--border-color);
        --bs-table-striped-bg: rgba(255,255,255,0.045);
        --bs-table-hover-bg: rgba(255,255,255,0.07);
        background-color: transparent !important;
        color: var(--text-color) !important;
        border-color: var(--border-color) !important;
    }

    .table-responsive {
        background: transparent;
        border-color: var(--border-color);
    }

    .table tbody tr,
    .table tbody td,
    .table-borderless tbody tr,
    .table-borderless tbody td {
        background: rgba(255,255,255,0.035) !important;
    }

    .table tbody tr + tr td {
        border-top-color: var(--border-color);
    }

    .table thead th,
    .table tfoot th,
    .table tfoot td {
        background: rgba(13, 18, 34, 0.32) !important;
        color: #cbd6e4 !important;
    }

    .table-borderless th,
    .table-borderless td {
        border-color: transparent !important;
    }

    .table .fw-semibold,
    .table strong,
    .fw-bold,
    .fw-semibold {
        color: var(--text-color);
    }

    .card-body .rounded-4,
    .card-body .rounded-3,
    div[style*="background: var(--light-bg)"],
    div[style*="background: var(--white)"],
    .accordion-button,
    .accordion-body {
        background: rgba(255,255,255,0.075) !important;
        color: var(--text-color) !important;
        border-color: var(--border-color) !important;
    }

    .alert {
        color: var(--text-color);
        border: 1px solid var(--border-color) !important;
    }

    .alert-info,
    .alert-warning {
        background: rgba(120, 174, 202, 0.12) !important;
    }

    .modal-body,
    .modal-footer,
    .modal-footer.bg-light,
    .modal-footer[style],
    .modal-body[style] {
        background: #242b45 !important;
        color: var(--text-color);
    }

    .form-control,
    .form-select {
        background-color: rgba(255,255,255,0.075);
        color: var(--text-color);
        border-color: var(--border-color);
    }

    .form-control::placeholder {
        color: #8f9caf;
    }

    .btn-primary {
        background: #4f7891;
        border-color: #4f7891;
        color: #ffffff !important;
    }

    .btn-primary:hover {
        background: var(--primary-hover);
        border-color: var(--primary-hover);
        color: #102015 !important;
    }

    .btn-outline-primary {
        border-color: #78aeca;
        color: #d8edf7 !important;
        background: rgba(120, 174, 202, 0.08);
    }

    .btn-outline-primary:hover {
        background: #78aeca;
        color: #122033 !important;
    }

    .btn-outline-danger {
        background: rgba(220, 53, 69, 0.08);
        color: #ff8793 !important;
        border-color: #ff8793;
    }

    .btn-outline-danger:hover {
        background: #dc3545;
        color: #ffffff !important;
    }

    .btn-outline-secondary {
        background: rgba(255,255,255,0.06);
        border-color: #8fa0b8;
        color: #e4ebf5 !important;
    }

    .btn-outline-secondary:hover {
        background: #8fa0b8;
        color: #111827 !important;
    }

    .btn-primary:disabled,
    .btn-primary.disabled,
    .btn:disabled,
    .btn.disabled {
        background: rgba(120, 174, 202, 0.28) !important;
        border-color: rgba(120, 174, 202, 0.38) !important;
        color: #c8d3df !important;
        opacity: 1;
    }

    .footer-modern {
        background: #242b45;
        color: var(--text-muted);
    }

    .footer-menu a,
    .footer-contact-item,
    .footer-address,
    .footer-bottom {
        color: #c0c9d6;
    }

    .footer-social a,
    .footer-scroll-top {
        background: rgba(255,255,255,0.08);
        color: #d8edf7;
        border-color: var(--border-color);
    }
}

/* ============================================================
   ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ IPTV
   ============================================================ */

/* Индикатор шагов */
.step-indicator {
    cursor: pointer;
}
.step-indicator:hover .step-circle {
    transform: scale(1.05);
}
.step-circle {
    transition: all 0.3s ease;
}

/* Уведомления */
.custom-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 99999;
    min-width: 300px;
    max-width: 400px;
    padding: 15px 20px;
    background: var(--notification-bg, var(--white, #ffffff));
    color: var(--notification-color, var(--text-color, #2A2A2A));
    border: 1px solid var(--notification-border, rgba(0,0,0,0.06));
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
}

@media (max-width: 576px) {
    .custom-notification {
        min-width: auto;
        max-width: calc(100% - 40px);
        right: 10px;
        top: 70px;
    }
}

/* ============================================================
   СТИЛИ ДЛЯ СТРАНИЦЫ НАСТРОЕК
   ============================================================ */

/* Маска для телефона */
.phone-mask {
    font-family: 'Roboto', sans-serif;
}

/* ============================================================
   СТИЛИ ДЛЯ СТРАНИЦЫ ПЛАТЕЖЕЙ
   ============================================================ */

/* Быстрые суммы */
.quick-amount {
    transition: var(--transition);
}
.quick-amount:hover {
    background: var(--primary-color) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
}

/* ============================================================
   СТИЛИ ДЛЯ СТРАНИЦЫ ТРАФИКА
   ============================================================ */

/* Фильтры */
.traffic-filters .btn-group {
    flex-wrap: wrap;
    gap: 4px;
}

/* ============================================================
   СТИЛИ ДЛЯ СТРАНИЦЫ РЕГИСТРАЦИИ IPTV
   ============================================================ */

/* Скрытие/показ шагов */
.step-card {
    transition: all 0.3s ease;
}
.step-card.hidden {
    display: none;
}

/* ============================================================
   АНИМАЦИИ
   ============================================================ */

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================================================
   ТЕМНАЯ ТЕМА - ДОПОЛНЕНИЯ
   ============================================================ */

@media (prefers-color-scheme: dark) {
    :root {
        --notification-bg: #1a1a2e;
        --notification-color: #f1f3f5;
        --notification-border: rgba(255,255,255,0.08);
    }

    .custom-notification {
        background: var(--notification-bg);
        border: 1px solid var(--notification-border);
        color: var(--notification-color);
    }

    .custom-notification .btn-close {
        filter: brightness(0) invert(1);
    }

    #tariffChangeModal .tariff-change-speed {
        background: rgba(120, 174, 202, 0.2);
        color: #e6f5ff;
        border: 1px solid rgba(120, 174, 202, 0.34);
    }

    #tariffChangeModal .tariff-change-price {
        color: #8fe0a5;
    }

    #paymentModal .payment-amount-input {
        background: rgba(255,255,255,0.11);
        color: #ffffff;
        border-color: rgba(143, 224, 165, 0.55);
        caret-color: #8fe0a5;
    }

    #paymentModal .payment-amount-input:focus {
        background: rgba(255,255,255,0.14);
        color: #ffffff;
        border-color: #8fe0a5;
        box-shadow: 0 0 0 3px rgba(143, 224, 165, 0.2);
    }

    #paymentModal .payment-amount-input::placeholder {
        color: #b7c1d0;
    }

    .step-circle {
        background: #2a2a4a !important;
        color: #8a8a9a !important;
    }
    .step-circle.active {
        background: var(--primary-color) !important;
        color: var(--white) !important;
    }
    .step-circle.completed {
        background: var(--primary-hover) !important;
        color: var(--white) !important;
    }
    .step-line {
        background: rgba(255,255,255,0.1) !important;
    }
}

/* ============================================================
   КОМПАКТНЫЕ БЕЙДЖИ ДЛЯ ГЛАВНОЙ СТРАНИЦЫ
   ============================================================ */

.badge-gigabit {
    background: linear-gradient(135deg, var(--primary-hover, #67d386) 0%, var(--primary-color, #3b596f) 100%);
    color: var(--white, #ffffff);
    padding: 3px 8px;
    border-radius: 12px;
}

.badge-combo {
    background: linear-gradient(135deg, var(--primary-color, #3b596f) 0%, var(--primary-hover, #67d386) 100%);
    color: var(--white, #ffffff);
    padding: 3px 8px;
    border-radius: 12px;
}

/* ============================================================
   ГИГАБИТНЫЙ БАННЕР
   ============================================================ */

.gigabit-banner {
    background: linear-gradient(135deg, var(--primary-color, #3b596f) 0%, var(--primary-hover, #67d386) 100%);
    color: var(--white, #ffffff);
}

.gigabit-banner .btn-light {
    background: var(--white, #ffffff);
    color: var(--primary-color, #3b596f);
}

.gigabit-banner .btn-light:hover {
    background: var(--light-bg, #f8f9fa);
    transform: translateY(-2px);
}

/* ============================================================
   АДАПТИВНЫЕ СТИЛИ ДЛЯ ГЛАВНОЙ СТРАНИЦЫ
   ============================================================ */

/* Планшеты и маленькие экраны */
@media (max-width: 991.98px) {
    .card-header-custom {
        gap: 6px;
    }
    .card-header-custom h3 {
        font-size: 1rem;
    }
    .card-header-custom i {
        font-size: 1.1rem;
    }
}

/* Мобильные телефоны */
@media (max-width: 767.98px) {
    /* Заголовки карточек - компактно */
    .card-header-custom {
        padding-bottom: 8px;
        margin-bottom: 12px;
        gap: 4px;
    }
    .card-header-custom h3 {
        font-size: 0.9rem;
    }
    .card-header-custom i {
        font-size: 1rem;
    }

    /* Бейджи в одну строку */
    .card-header-custom .d-flex.flex-wrap {
        gap: 2px !important;
    }
    .card-header-custom .badge {
        font-size: 0.5rem !important;
        padding: 2px 6px !important;
    }

    /* Кнопки в заголовках */
    .card-header-custom .btn-sm {
        font-size: 0.6rem !important;
        padding: 3px 8px !important;
    }

    /* Таблицы - компактно */
    .table-sm {
        font-size: 0.75rem;
    }
    .table-sm thead th {
        font-size: 0.6rem !important;
        padding: 4px 4px !important;
    }
    .table-sm td {
        padding: 4px 4px !important;
        font-size: 0.75rem;
    }
    .table-sm .btn-sm {
        font-size: 0.55rem !important;
        padding: 2px 6px !important;
    }
    .table-sm .badge {
        font-size: 0.5rem !important;
        padding: 2px 6px !important;
    }
    .table-sm .speed-badge {
        font-size: 0.6rem !important;
        padding: 2px 6px !important;
    }
    .table-sm .ip-address-card {
        padding: 2px 4px !important;
        margin-bottom: 2px !important;
    }
    .table-sm .ip-value {
        font-size: 0.6rem !important;
        padding: 1px 4px !important;
    }
    .table-sm .ip-mac {
        font-size: 0.5rem !important;
        margin-top: 2px !important;
        padding-top: 2px !important;
    }
    .table-sm .status-badge {
        font-size: 0.6rem !important;
        padding: 2px 6px !important;
    }
    .table-sm strong {
        font-size: 0.8rem !important;
    }

    /* Быстрые действия */
    .quick-actions .btn {
        font-size: 0.7rem !important;
        padding: 6px 12px !important;
    }

    /* Информация об абоненте */
    .table-borderless th {
        font-size: 0.7rem !important;
    }
    .table-borderless td {
        font-size: 0.75rem !important;
    }

    /* Баннер */
    .gigabit-banner h5 {
        font-size: 0.8rem !important;
    }
    .gigabit-banner p {
        font-size: 0.7rem !important;
    }
    .gigabit-banner .btn {
        font-size: 0.7rem !important;
        padding: 4px 12px !important;
    }
}

/* Очень маленькие экраны (до 400px) */
@media (max-width: 400px) {
    .card-custom {
        padding: 10px !important;
    }
    .card-header-custom h3 {
        font-size: 0.8rem !important;
    }
    .table-sm {
        font-size: 0.65rem !important;
    }
    .table-sm td {
        padding: 2px 2px !important;
        font-size: 0.65rem !important;
    }
    .table-sm .fw-semibold {
        font-size: 0.7rem !important;
    }
    .table-sm strong {
        font-size: 0.7rem !important;
    }
    .table-sm .btn-sm {
        font-size: 0.5rem !important;
        padding: 1px 4px !important;
    }
    .table-sm .status-badge {
        font-size: 0.5rem !important;
        padding: 1px 4px !important;
    }
    .table-sm .ip-value {
        font-size: 0.5rem !important;
    }
    .card-header-custom .badge {
        font-size: 0.45rem !important;
        padding: 1px 4px !important;
    }
    .card-header-custom .btn-sm {
        font-size: 0.5rem !important;
        padding: 2px 6px !important;
    }
}

/* ============================================================
   ТАБЛИЦЫ НА МОБИЛЬНЫХ - КАРТОЧКИ
   ============================================================ */

@media (max-width: 576px) {
    /* Превращаем таблицы в карточки */
    .table-responsive .table thead {
        display: none;
    }

    .table-responsive .table tbody tr {
        display: block;
        margin-bottom: 8px;
        padding: 8px;
        border: 1px solid var(--border-color, rgba(59, 89, 111, 0.08));
        border-radius: 8px;
        background: var(--white, #ffffff);
    }

    .table-responsive .table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 4px 0 !important;
        border: none;
        border-bottom: 1px solid var(--border-color, rgba(59, 89, 111, 0.04));
        font-size: 0.75rem !important;
        flex-wrap: wrap;
        gap: 2px;
    }

    .table-responsive .table tbody td:last-child {
        border-bottom: none;
    }

    .table-responsive .table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.6rem;
        color: var(--text-muted, #6c757d);
        text-transform: uppercase;
        letter-spacing: 0.3px;
        flex-shrink: 0;
        min-width: 70px;
    }

    .table-responsive .table tbody td .btn {
        font-size: 0.55rem !important;
        padding: 2px 8px !important;
    }

    .table-responsive .table tbody td .status-badge {
        font-size: 0.55rem !important;
        padding: 1px 6px !important;
    }

    .table-responsive .table tbody td .speed-badge {
        font-size: 0.55rem !important;
        padding: 1px 6px !important;
    }

    .table-responsive .table tbody td .badge {
        font-size: 0.5rem !important;
        padding: 1px 6px !important;
    }

    .table-responsive .table tbody td .ip-address-card {
        width: 100%;
        padding: 2px 4px !important;
    }

    .table-responsive .table tbody td .ip-value {
        font-size: 0.55rem !important;
        padding: 1px 4px !important;
    }

    /* Для колонки IP-адрес */
    .table-responsive .table tbody td[data-label="IP-адрес"] {
        flex-direction: column;
        align-items: stretch;
    }
    .table-responsive .table tbody td[data-label="IP-адрес"]:before {
        margin-bottom: 2px;
    }
    .table-responsive .table tbody td[data-label="IP-адрес"] .ip-address-card {
        width: 100%;
    }

    /* Для колонки В составе */
    .table-responsive .table tbody td[data-label="В составе"] .mb-1 {
        font-size: 0.65rem;
    }
}

/* Темная тема для мобильных таблиц */
@media (prefers-color-scheme: dark) {
    @media (max-width: 576px) {
        .table-responsive .table tbody tr {
            background: rgba(255,255,255,0.04);
            border-color: rgba(255,255,255,0.06);
        }
        .table-responsive .table tbody td {
            border-bottom-color: rgba(255,255,255,0.04);
        }
    }
}

/* ============================================================
     БАЗОВЫЕ РАЗМЕРЫ ШРИФТОВ
     ============================================================ */

/* Базовый размер - 16px */
html {
    font-size: 16px;
}

body {
    font-size: 1rem;
    line-height: 1.6;
}

/* ============================================================
     КОМПАКТНЫЕ БЕЙДЖИ В ЗАГОЛОВКАХ
     ============================================================ */

.card-header-custom .badge {
    font-size: 0.75rem !important;
    padding: 5px 12px !important;
    border-radius: 20px;
}

/* ============================================================
     АДАПТИВНЫЕ РАЗМЕРЫ
     ============================================================ */

/* Планшеты и маленькие экраны */
@media (max-width: 991.98px) {
    html {
        font-size: 15px;
    }
    .card-header-custom h3 {
        font-size: 1.1rem;
    }
    .card-header-custom .badge {
        font-size: 0.65rem !important;
        padding: 4px 10px !important;
    }
}

/* Мобильные телефоны */
@media (max-width: 767.98px) {
    html {
        font-size: 15px;
    }

    /* Заголовки карточек */
    .card-header-custom {
        padding-bottom: 10px;
        margin-bottom: 14px;
        gap: 6px;
    }
    .card-header-custom h3 {
        font-size: 1rem;
    }
    .card-header-custom i {
        font-size: 1.1rem;
    }
    .card-header-custom .badge {
        font-size: 0.6rem !important;
        padding: 3px 8px !important;
    }
    .card-header-custom .btn {
        font-size: 0.75rem !important;
        padding: 5px 12px !important;
    }

    /* Таблицы */
    .table {
        font-size: 0.85rem;
    }
    .table thead th {
        font-size: 0.7rem;
        padding: 6px 8px;
    }
    .table td {
        padding: 8px 6px;
        font-size: 0.85rem;
    }
    .table .btn {
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
    }
    .table .badge {
        font-size: 0.6rem !important;
        padding: 3px 8px !important;
    }
    .table .status-badge {
        font-size: 0.7rem;
        padding: 3px 10px;
    }
    .table .speed-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    .table .ip-value {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    .table .ip-mac {
        font-size: 0.6rem;
    }
    .table strong {
        font-size: 0.9rem;
    }

    /* Информация об абоненте */
    .table-borderless th {
        font-size: 0.8rem;
    }
    .table-borderless td {
        font-size: 0.85rem;
    }
    .table-borderless .badge {
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
    }

    /* Баланс и кредит */
    .card-body .row .col-6 .p-3 .fw-bold {
        font-size: 1.2rem !important;
    }

    /* Быстрые действия */
    .quick-actions .btn {
        font-size: 0.8rem !important;
        padding: 8px 16px !important;
    }

    /* Баннер */
    .gigabit-banner h4 {
        font-size: 1rem !important;
    }
    .gigabit-banner p {
        font-size: 0.85rem !important;
    }
    .gigabit-banner .btn {
        font-size: 0.8rem !important;
        padding: 8px 20px !important;
    }
}

/* Очень маленькие экраны (до 400px) */
@media (max-width: 400px) {
    html {
        font-size: 14px;
    }
    .card-custom {
        padding: 12px !important;
    }
    .card-header-custom h3 {
        font-size: 0.9rem;
    }
    .table {
        font-size: 0.75rem;
    }
    .table td {
        padding: 4px 4px;
        font-size: 0.75rem;
    }
    .table .fw-semibold {
        font-size: 0.8rem;
    }
    .table strong {
        font-size: 0.8rem;
    }
    .table .btn {
        font-size: 0.6rem !important;
        padding: 2px 6px !important;
    }
}

/* ============================================================
     МОБИЛЬНЫЕ ТАБЛИЦЫ - КАРТОЧКИ
     ============================================================ */

@media (max-width: 576px) {
    .table-responsive .table thead {
        display: none;
    }

    .table-responsive .table tbody tr {
        display: block;
        margin-bottom: 12px;
        padding: 12px;
        border: 1px solid var(--border-color, rgba(59, 89, 111, 0.08));
        border-radius: 10px;
        background: var(--white, #ffffff);
    }

    .table-responsive .table tbody td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 0 !important;
        border: none;
        border-bottom: 1px solid var(--border-color, rgba(59, 89, 111, 0.04));
        font-size: 0.85rem !important;
        flex-wrap: wrap;
        gap: 4px;
    }

    .table-responsive .table tbody td:last-child {
        border-bottom: none;
    }

    .table-responsive .table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.7rem;
        color: var(--text-muted, #6c757d);
        text-transform: uppercase;
        letter-spacing: 0.3px;
        flex-shrink: 0;
        min-width: 80px;
    }

    .table-responsive .table tbody td .btn {
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
    }

    .table-responsive .table tbody td .status-badge {
        font-size: 0.7rem;
        padding: 3px 10px;
    }

    .table-responsive .table tbody td .speed-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .table-responsive .table tbody td .badge {
        font-size: 0.6rem !important;
        padding: 3px 8px !important;
    }

    .table-responsive .table tbody td .ip-address-card {
        width: 100%;
        padding: 4px 8px !important;
    }

    .table-responsive .table tbody td .ip-value {
        font-size: 0.7rem;
        padding: 2px 6px;
    }

    /* Для колонки IP-адрес */
    .table-responsive .table tbody td[data-label="IP-адрес"] {
        flex-direction: column;
        align-items: stretch;
    }
    .table-responsive .table tbody td[data-label="IP-адрес"]:before {
        margin-bottom: 4px;
    }

    /* Для колонки В составе */
    .table-responsive .table tbody td[data-label="В составе"] .mb-1 {
        font-size: 0.75rem;
    }

    /* Для колонки Действие */
    .table-responsive .table tbody td[data-label="Действие"] {
        justify-content: flex-end;
    }
    .table-responsive .table tbody td[data-label="Действие"]:before {
        display: none;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    @media (max-width: 576px) {
        .table-responsive .table tbody tr {
            background: rgba(255,255,255,0.04);
            border-color: rgba(255,255,255,0.06);
        }
        .table-responsive .table tbody td {
            border-bottom-color: rgba(255,255,255,0.04);
        }
    }
}

/* ============================================================
     СТИЛИ ДЛЯ АККОРДЕОНА (FAQ)
     ============================================================ */

.accordion-item {
    background: transparent;
    border: none;
}

.accordion-item .accordion-button {
    font-weight: 500;
    padding: 14px 18px;
    border-radius: 12px !important;
    background: var(--light-bg, #f8f9fa);
    color: var(--primary-color, #3b596f);
    box-shadow: none;
    transition: all 0.3s ease;
}

.accordion-item .accordion-button:hover {
    background: var(--primary-light, rgba(59, 89, 111, 0.08));
}

.accordion-item .accordion-button:not(.collapsed) {
    background: var(--primary-color, #3b596f);
    color: var(--white, #ffffff);
    border-radius: 12px 12px 0 0 !important;
}

.accordion-item .accordion-button:not(.collapsed)::after {
    filter: brightness(0) invert(1);
}

.accordion-item .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-item .accordion-collapse {
    border-radius: 0 0 12px 12px;
}

.accordion-item .accordion-body {
    background: var(--white, #ffffff);
    border: 1px solid var(--border-color, rgba(59, 89, 111, 0.08));
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 16px 20px;
    color: var(--text-color, #2A2A2A);
}

/* Темная тема для аккордеона */
@media (prefers-color-scheme: dark) {
    .accordion-item .accordion-button {
        background: rgba(255,255,255,0.04);
        color: #d0d0d0;
    }
    .accordion-item .accordion-button:hover {
        background: rgba(255,255,255,0.08);
    }
    .accordion-item .accordion-button:not(.collapsed) {
        background: var(--primary-color, #3b596f);
        color: var(--white, #ffffff);
    }
    .accordion-item .accordion-body {
        background: rgba(255,255,255,0.02);
        border-color: rgba(255,255,255,0.06);
        color: #d0d0d0;
    }
}

/* ============================================================
     АДАПТИВ ДЛЯ СТРАНИЦЫ ОБЕЩАННОГО ПЛАТЕЖА
     ============================================================ */

@media (max-width: 767.98px) {
    .promised-info .col-4 .fs-2 {
        font-size: 1.5rem !important;
    }
    .promised-info .col-4 .fa-2x {
        font-size: 1.5rem !important;
    }

    .accordion-item .accordion-button {
        font-size: 0.85rem;
        padding: 10px 14px;
    }
    .accordion-item .accordion-body {
        font-size: 0.85rem;
        padding: 12px 16px;
    }
}

@media (max-width: 400px) {
    .promised-info .col-4 .fs-2 {
        font-size: 1.2rem !important;
    }
    .promised-info .col-4 .fa-2x {
        font-size: 1.2rem !important;
    }
    .promised-info .col-4 .small {
        font-size: 0.6rem !important;
    }
}

/* ============================================================
   RESPONSIVE POLISH
   ============================================================ */

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

.content,
.card-custom,
.table,
.form-control,
.btn,
.badge,
.status-badge,
.speed-badge {
    min-width: 0;
}

.card-custom {
    overflow-wrap: anywhere;
}

.card-header-custom {
    min-width: 0;
}

.card-header-custom h3,
.card-header-custom .card-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.btn {
    justify-content: center;
    min-height: 40px;
    text-align: center;
    overflow-wrap: anywhere;
    white-space: normal;
}

.btn-sm {
    min-height: 34px;
}

.btn-group {
    flex-wrap: wrap;
    gap: 6px;
}

.btn-group > .btn {
    border-radius: 8px !important;
    margin: 0 !important;
}

.table-responsive {
    scrollbar-width: thin;
}

.table th,
.table td {
    vertical-align: middle;
}

@media (max-width: 991.98px) {
    .navbar-modern .container-fluid-custom {
        gap: 6px;
    }

    .user-menu {
        gap: 6px;
    }

    .user-menu .btn-auth {
        padding-inline: 10px;
    }
}

@media (max-width: 767.98px) {
    body {
        background: #f5f7fa;
    }

    main {
        padding-top: 16px;
    }

    .page-header {
        margin-bottom: 16px;
    }

    .page-header h1 {
        font-size: 1.45rem;
        line-height: 1.2;
    }

    .card-custom {
        border-radius: 12px !important;
        padding: 16px !important;
    }

    .card-header-custom {
        align-items: flex-start;
    }

    .card-header-custom .ms-auto {
        width: 100%;
        margin-left: 0 !important;
    }

    .card-header-custom .ms-auto,
    .card-header-custom .ms-auto.d-flex {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .card-header-custom .ms-auto .btn,
    .card-header-custom .ms-auto a {
        width: 100%;
    }

    .display-4 {
        font-size: 2rem;
        line-height: 1.1;
    }

    .row > [class*="col-"] > .p-2,
    .row > [class*="col-"] > .p-3 {
        min-height: 100%;
    }

    .form-control,
    .form-select {
        font-size: 16px;
    }
}

@media (max-width: 575.98px) {
    :root {
        --header-height: 64px;
    }

    .container-fluid-custom {
        padding-inline: 12px;
    }

    .footer-modern .container-fluid-custom {
        padding-inline: 28px;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .user-menu .user-avatar,
    .user-menu .btn-logout {
        width: 34px;
        height: 34px;
    }

    .user-menu .btn-auth {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        font-size: 0.8rem;
        justify-content: center;
    }

    .card-header-custom {
        gap: 8px;
    }

    .card-header-custom .badge {
        white-space: normal;
        text-align: center;
    }

    .quick-actions,
    .card-body > .d-flex.flex-wrap {
        gap: 10px !important;
    }

    .quick-action-item,
    .card-body > .d-flex.flex-wrap > .flex-grow-1 {
        min-width: 100% !important;
    }
}

@media (max-width: 576px) {
    .table-responsive .table:not(.mobile-card-table) thead {
        display: table-header-group;
    }

    .table-responsive .table:not(.mobile-card-table) tbody tr {
        display: table-row;
        margin-bottom: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .table-responsive .table:not(.mobile-card-table) tbody td {
        display: table-cell;
        padding: 8px 6px !important;
        border-bottom: var(--bs-border-width) solid var(--bs-border-color);
    }

    .table-responsive .table:not(.mobile-card-table) tbody td::before {
        content: none;
    }

    .table-responsive .table.mobile-card-table tbody td {
        align-items: flex-start;
        overflow-wrap: anywhere;
    }

    .table-responsive .table.mobile-card-table tbody td::before {
        min-width: 96px;
        max-width: 42%;
        line-height: 1.25;
        text-align: left;
    }

    .table-responsive .table.mobile-card-table tbody td.text-end {
        text-align: left !important;
    }
}

.available-packages-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.available-packages-title strong {
    min-width: 0;
}

.available-packages-count {
    flex: 0 0 auto;
}

.price-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
    white-space: nowrap;
}

.tariff-change-speed {
    background: rgba(59, 89, 111, 0.1);
    color: #3b596f;
}

.tariff-change-price {
    color: #3b596f;
    font-size: 1.1rem;
}

.payment-amount-input {
    background: #ffffff;
    color: var(--text-color);
    border: 2px solid #e9ecef;
    font-weight: 700;
}

.payment-amount-input:focus {
    color: var(--text-color);
}

.tv-password-btn {
    white-space: nowrap;
}

.btn-icon-card {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    white-space: nowrap;
}

.btn-icon-card i {
    margin: 0;
    font-size: 0.95rem;
}

.dashboard-topup-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 100%;
    padding: 18px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #ffffff !important;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(59, 89, 111, 0.22);
}

.dashboard-topup-action > * {
    display: none !important;
}

.dashboard-topup-action::before {
    content: "\f055";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.45rem;
    line-height: 1;
}

.dashboard-topup-action::after {
    content: "Пополнить";
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.15;
}

.dashboard-topup-action:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(103, 211, 134, 0.28);
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 5px 10px !important;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.75rem !important;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
}

.badge-soft.badge-gigabit {
    background: rgba(103, 211, 134, 0.16) !important;
    border-color: rgba(103, 211, 134, 0.35);
    color: #267345 !important;
}

.badge-soft.badge-combo {
    background: rgba(59, 89, 111, 0.1) !important;
    border-color: rgba(59, 89, 111, 0.18);
    color: var(--primary-color) !important;
}

.badge-soft.badge-basic-speed {
    background: rgba(255, 193, 7, 0.16) !important;
    border-color: rgba(255, 193, 7, 0.35);
    color: #8a6500 !important;
}

@media (max-width: 767.98px) {
    .card-header-custom .btn-icon-card.ms-auto {
        width: 38px;
        margin-left: auto !important;
    }

    .tv-password-btn {
        width: 100%;
        min-height: 44px;
        white-space: normal;
    }
}

@media (max-width: 576px) {
    .available-packages-title {
        flex: 1 1 auto;
        gap: 6px;
    }

    .available-packages-title strong {
        line-height: 1.25;
    }

    .price-stack {
        flex-direction: row;
        align-items: baseline;
        justify-content: flex-start;
        gap: 4px;
        width: auto;
        margin-left: auto;
        line-height: 1.25;
    }

    .price-stack small {
        display: inline !important;
    }
}

@media (prefers-color-scheme: dark) {
    .table > :not(caption) > * > *,
    .table tbody tr,
    .table-responsive .table tbody tr,
    .table-responsive .table tbody td,
    .table-responsive .table tbody th {
        background-color: rgba(255,255,255,0.035) !important;
        color: #f2f6fb !important;
        border-color: rgba(255,255,255,0.13) !important;
    }

    .table thead th,
    .table tfoot th,
    .table tfoot td,
    .table-light,
    .table-light > * > * {
        background-color: rgba(13, 18, 34, 0.36) !important;
        color: #cbd6e4 !important;
        border-color: rgba(255,255,255,0.13) !important;
    }

    .table-borderless > :not(caption) > * > * {
        border-color: transparent !important;
    }

    .bg-light,
    .card-body .rounded-4,
    .card-body .rounded-3,
    .accordion-button,
    .accordion-body {
        background-color: rgba(255,255,255,0.075) !important;
        color: #f2f6fb !important;
    }

    .btn-primary,
    .btn-primary:focus {
        background-color: #4f7891 !important;
        border-color: #4f7891 !important;
        color: #ffffff !important;
    }

    .btn-primary:hover {
        background-color: #67d386 !important;
        border-color: #67d386 !important;
        color: #102015 !important;
    }

    .btn-outline-primary {
        background-color: rgba(120, 174, 202, 0.08) !important;
        border-color: #78aeca !important;
        color: #d8edf7 !important;
    }

    .btn-outline-danger {
        background-color: rgba(220, 53, 69, 0.08) !important;
        border-color: #ff8793 !important;
        color: #ff8793 !important;
    }

    .btn:disabled,
    .btn.disabled {
        background-color: rgba(120, 174, 202, 0.28) !important;
        border-color: rgba(120, 174, 202, 0.38) !important;
        color: #d6e1ed !important;
        opacity: 1 !important;
    }

    .badge-soft.badge-basic-speed {
        background: rgba(255, 193, 7, 0.16) !important;
        border-color: rgba(255, 193, 7, 0.34);
        color: #ffe3a3 !important;
    }
}

@media (prefers-color-scheme: dark) and (max-width: 767.98px) {
    html,
    body {
        background: #111827 !important;
        color: #f2f6fb;
    }

    main,
    .container-fluid-custom,
    .page-header {
        background: transparent !important;
    }

    .page-header h1,
    .page-header h2,
    .page-header h3,
    .page-header .h1,
    .page-header .h2,
    .page-header .h3,
    main > h1,
    main > h2,
    main > h3 {
        color: #f2f6fb !important;
    }

    .page-header p,
    .page-header .text-muted {
        color: #b7c1d0 !important;
    }
}

.subscriber-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.subscriber-name-row > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.subscriber-data-update {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
    min-height: 30px;
    padding: 4px 10px;
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: nowrap;
}

.subscriber-data-update i {
    font-size: 0.68rem;
}

@media (max-width: 767.98px) {
    .subscriber-name-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .subscriber-data-update {
        min-height: 29px;
        padding: 4px 9px;
        font-size: 0.68rem;
    }
}
