/* ============================================================================
   ОБЪЕДИНЕННЫЙ CSS ФАЙЛ ДЛЯ ВСЕХ СТРАНИЦ
   ============================================================================ */

/* ============================================================================
   1. ОБЩИЕ СТИЛИ И СБРОС
   ============================================================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ============================================================================
   2. ОБЩИЕ СТИЛИ ДЛЯ КНОПОК
   ============================================================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

/* ============================================================================
   3. ОБЩИЕ СТИЛИ ДЛЯ ФОРМ
   ============================================================================ */

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ============================================================================
   4. ОБЩИЕ СТИЛИ ДЛЯ ЗАГОЛОВКОВ
   ============================================================================ */

.page-title {
    font-size: 2.5rem;
    color: #2d3748;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #718096;
}

.section-title {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 1rem;
}

/* ============================================================================
   5. ОБЩИЕ СТИЛИ ДЛЯ КАРТОЧЕК
   ============================================================================ */

.card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

/* ============================================================================
   6. ОБЩИЕ СТИЛИ ДЛЯ НАВИГАЦИИ
   ============================================================================ */

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #718096;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: #e2e8f0;
    color: #2d3748;
}

/* ============================================================================
   7. ОБЩИЕ СТИЛИ ДЛЯ СТАТУСОВ
   ============================================================================ */

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge2 {
    padding: 0.25rem 0.75rem;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 500;
}

.status-active {
    background: #c6f6d5;
    color: #22543d;
}

.status-pending {
    background: #fef5e7;
    color: #744210;
}

.status-success {
    background: #c6f6d5;
    color: #22543d;
}

.status-warning {
    background: #fef5e7;
    color: #744210;
}

.status-danger {
    background: #fed7d7;
    color: #742a2a;
}

.status-action {
    background: #b2f2ff;
    color: #22543d;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================================
   8. ОБЩИЕ СТИЛИ ДЛЯ ФУТЕРА
   ============================================================================ */

.footer {
    text-align: center;
    padding: 2rem;
    color: #718096;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
}

/* ============================================================================
   9. СТИЛИ ДЛЯ ПОЛЕЙ С МАСКОЙ ТЕЛЕФОНА
   ============================================================================ */

input[type="tel"] {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

input[type="tel"]:focus {
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ============================================================================
   10. СТИЛИ ДЛЯ ВАЛИДАЦИИ
   ============================================================================ */

.form-input.error,
.mobile-form-input.error {
    border-color: #e53e3e;
    background-color: #fed7d7;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.error-message {
    color: #e53e3e;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.error-message::before {
    content: "⚠️";
    font-size: 0.7rem;
}

/* Стили для обязательных полей */
.form-label.required::after,
.mobile-form-label.required::after {
    content: " *";
    color: #e53e3e;
    font-weight: bold;
}

/* ============================================================================
   11. СТИЛИ ДЛЯ ГЛАВНОЙ СТРАНИЦЫ (index.html)
   ============================================================================ */

/* Фон для главной страницы */
body.index-page {
    _background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
	background-image: url(/files/background.png);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.gallery-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.gallery-item h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.gallery-item p {
    color: #718096;
    margin-bottom: 20px;
    line-height: 1.5;
}

.gallery-item .btn {
    margin: 5px;
}

.gallery-item .btn-success {
    background: linear-gradient(45deg, #48bb78, #38a169);
    position: relative;
    overflow: hidden;
}

.gallery-item .btn-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.gallery-item .btn-success:hover::before {
    left: 100%;
}

/* ============================================================================
   12. СТИЛИ ДЛЯ ЛИЧНОГО КАБИНЕТА (lk.html)
   ============================================================================ */

/* Фон для страниц приложения */
body.lk-page,
body.md-page {
    background-color: #f5f7fa;
}

.lk-page .header,
.md-page .header {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
	background-color:#283e79;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.back-btn {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: rgba(255,255,255,0.3);
}

.back-btn-small {
	font-size: 0.5em;
}

.back-btn2 {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgb(21 182 233);
    border-radius: 20px;
    transition: background 0.3s ease;
}

.back-btn2:hover {
    background: rgb(13 114 147);
}

/* Мобильная навигация */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100vh;
    background: white;
    z-index: 200;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.mobile-nav.active {
    left: 0;
}

.nav-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-menu {
    list-style: none;
    padding: 1rem 0;
}

.nav-menu li {
    border-bottom: 1px solid #e2e8f0;
}

.nav-menu a {
    display: block;
    padding: 1rem;
    color: #4a5568;
    text-decoration: none;
    transition: background 0.3s ease;
}

.nav-menu a.active {
    background: #e2e8f0;
    color: #2d3748;
}

.nav-menu a:hover {
    background: #edf4ff;
    color: #2d3748;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    display: none;
}

.overlay.active {
    display: block;
}

.lk-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.sidebar {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.sidebar h3 {
    margin-bottom: 1rem;
    color: #4a5568;
    font-size: 1.1rem;
}

.main-content {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.welcome-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    margin: 0 auto 1rem;
}

.welcome-title {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    color: #718096;
    font-size: 0.9rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.balance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.balance-card {
    background: white;
    border-radius: 15px;
    padding: 1rem; /* LOE 1.5 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.balance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.balance-card.bonus-card {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.balance-card.balance-main {
    background: linear-gradient(135deg, #108ab9 0%, #055f96 100%);
    color: white;
}

.balance-card.balance-cur {
    background: linear-gradient(135deg, #10a2b9 0%, #058796 100%);
    color: white;
}

.balance-card.bonus-cash {
    background: linear-gradient(135deg, #59b910 0%, #139605 100%);
    color: white;
}

.balance-icon {
    font-size: 3rem;
    line-height: 1;
}

.balance-content {
    flex: 1;
}

.balance-label {
    font-size: 1rem; /* LOE 0.9 */
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.balance-value {
    font-size: 2rem;
    font-weight: bold;
}

.content-section {
    margin-bottom: 2rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background: #f7fafc;
    color: #4a5568;
    font-weight: 600;
}

.table.col2c td:nth-child(2) {
	text-align:right;
}

.mobile-orders {
    margin-top: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.order-item2 {
    padding: 0.5rem 0;
}

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

.order-info h4 {
    font-size: 0.9rem;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.order-info p {
    font-size: 0.8rem;
    color: #718096;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-rowA {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #718096;
    font-size: 0.7rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.nav-item.active {
    color: #667eea;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

/* ============================================================================
   13. СТИЛИ ДЛЯ РЕДАКТИРОВАНИЯ ПРОФИЛЯ (md.html)
   ============================================================================ */

.md-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.profile-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-sidebar {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: fit-content;
}

.profile-avatar {
    text-align: center;
    margin-bottom: 2rem;
}

.avatar-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: white;
    margin: 0 auto 1rem;
    position: relative;
    overflow: hidden;
}

.avatar-upload {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: #4a5568;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.avatar-upload:hover {
    background: #2d3748;
}

.avatar-upload input {
    display: none;
}

.user-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.user-email {
    color: #718096;
    font-size: 0.9rem;
}

.profile-menu {
    list-style: none;
    margin-top: 2rem;
}

.profile-menu li {
    margin-bottom: 0.5rem;
}

.profile-menu a {
    display: block;
    padding: 1rem;
    color: #4a5568;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.profile-menu a:hover,
.profile-menu a.active {
    background: #e2e8f0;
    color: #2d3748;
}

.profile-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.section-description {
    color: #718096;
}

.form-section {
    margin-bottom: 3rem;
}

.form-section-title {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f7fafc;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label.required::after {
    content: " *";
    color: #e53e3e;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input:disabled {
    background: #f7fafc;
    color: #a0aec0;
    cursor: not-allowed;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.checkbox-label {
    color: #4a5568;
    font-size: 0.9rem;
    cursor: pointer;
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.button-groupC {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.button-groupL {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
	align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
	padding-bottom: 1rem;
    border-top: 1px solid #e2e8f0;
}

.btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-save::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-save:hover::before {
    left: 100%;
}

.btn-save2 {
    background: linear-gradient(135deg, #b766ea 0%, #9d4ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save2:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-save2::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-save2:hover::before {
    left: 100%;
}

.btn-cancel {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(152, 152, 152, 0.3);
}

.btn-cancel_::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-cancel_:hover::before {
    left: 100%;
}

.security-section {
    background: #f7fafc;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.security-title {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.security-info h4 {
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.security-info p {
    color: #718096;
    font-size: 0.9rem;
}

.security-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-enabled {
    background: #c6f6d5;
    color: #22543d;
}

.status-disabled {
    background: #fed7d7;
    color: #742a2a;
}

/* ============================================================================
   14. МОБИЛЬНЫЕ СТИЛИ ДЛЯ РЕДАКТИРОВАНИЯ ПРОФИЛЯ
   ============================================================================ */

.mobile-profile-avatar {
    text-align: center;
    margin-bottom: 2rem;
    background: white;
    border-radius: 15px;
    padding: 2rem 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mobile-avatar-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    margin: 0 auto 1rem;
    position: relative;
    overflow: hidden;
}

.mobile-avatar-upload {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 35px;
    height: 35px;
    background: #4a5568;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.mobile-avatar-upload:hover {
    background: #2d3748;
}

.mobile-avatar-upload input {
    display: none;
}

.mobile-user-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.mobile-user-email {
    color: #718096;
    font-size: 0.9rem;
}

.mobile-tabs {
    display: flex;
    background: white;
    border-radius: 15px;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.mobile-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    text-align: center;
    text-decoration: none;
    color: #718096;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
}

.mobile-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mobile-tab-content {
    display: none;
}

.mobile-tab-content.active {
    display: block;
}

.mobile-form-section {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.mobile-section-title {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f7fafc;
}

.mobile-form-group {
    margin-bottom: 1rem;
}

.mobile-form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.9rem;
}

.mobile-form-label.required::after {
    content: " *";
    color: #e53e3e;
}

.mobile-form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.mobile-form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mobile-form-textarea {
    min-height: 80px;
    resize: vertical;
}

.mobile-form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-form-select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mobile-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mobile-checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.mobile-checkbox-label {
    color: #4a5568;
    font-size: 0.9rem;
    cursor: pointer;
}

.mobile-security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.mobile-security-info h4 {
    color: #2d3748;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.mobile-security-info p {
    color: #718096;
    font-size: 0.8rem;
}

.mobile-security-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
}

.mobile-status-enabled {
    background: #c6f6d5;
    color: #22543d;
}

.mobile-status-disabled {
    background: #fed7d7;
    color: #742a2a;
}

.mobile-button-group {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    z-index: 100;
}

.mobile-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mobile-btn-cancel {
    background: #e2e8f0;
    color: #4a5568;
}

.mobile-btn:hover {
    transform: translateY(-1px);
}

/* ============================================================================
   15. СТИЛИ ДЛЯ ОПРЕДЕЛЕНИЯ УСТРОЙСТВА И ПЕРЕКЛЮЧЕНИЯ ВЕРСИЙ
   ============================================================================ */

/* Переключатель версий */
.version-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 10px 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
}

.version-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.version-toggle-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.version-toggle-label {
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 500;
    white-space: nowrap;
}

.version-toggle-buttons {
    display: flex;
    gap: 5px;
}

.version-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #718096;
    background: transparent;
    border: 1px solid transparent;
}

.version-btn:hover {
    background: #e2e8f0;
    color: #4a5568;
    transform: translateY(-1px);
}

.version-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.version-btn.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.version-icon {
    font-size: 1rem;
    line-height: 1;
}

.version-text {
    white-space: nowrap;
}

/* Информация об устройстве */
.device-info {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 0.8rem;
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 200px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.device-info:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
}

.device-info-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.device-type {
    font-weight: 500;
    color: #ffffff;
}

.device-resolution {
    opacity: 0.8;
    font-size: 0.7rem;
    color: #e2e8f0;
}

.device-recommendation {
    opacity: 0.9;
    font-size: 0.7rem;
    color: #48bb78;
    font-weight: 500;
}

/* ============================================================================
   16. АНИМАЦИИ
   ============================================================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(100%);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.version-toggle {
    animation: slideInFromTop 0.5s ease-out;
}

.device-info {
    animation: slideInFromBottom 0.5s ease-out;
}

.version-btn.active {
    animation: pulse 2s infinite;
}

/* ============================================================================
   17. УТИЛИТАРНЫЕ КЛАССЫ
   ============================================================================ */

/* Утилитарные классы для показа/скрытия элементов */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

.hide-on-mobile {
    display: block;
}

.hide-on-desktop {
    display: none;
}

/* Стили для плавных переходов */
.smooth-transition {
    transition: all 0.3s ease;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-up {
    animation: slideInFromBottom 0.5s ease-out;
}

.slide-down {
    animation: slideInFromTop 0.5s ease-out;
}

/* Стили для кнопок с иконками */
.btn-with-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-with-icon .icon {
    font-size: 1.1rem;
}

/* Стили для индикаторов загрузки */
.loading-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

/* Стили для подсказок */
.form-hint {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 0.25rem;
}

.mobile-form-hint {
    font-size: 0.75rem;
    color: #718096;
    margin-top: 0.25rem;
}

/* Стили для валидации */
.form-input:invalid,
.mobile-form-input:invalid {
    border-color: #e53e3e;
}

.form-input:valid,
.mobile-form-input:valid {
    border-color: #48bb78;
}

.box-error {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e53e3e;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
    background-color: #fed7d7;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.box-ok {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #3ee55a;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
    background-color: #8dffbc;
    box-shadow: 0 0 0 3px rgba(14, 165, 26, 0.1);
}

.box-act {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #3bc6e3;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
    background-color: #e8fbff;
    box-shadow: 0 0 0 3px rgba(14, 158, 165, 0.1);
}

.box-act h3 {
    display: block;
    font-size: 1.17em;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
	text-align: center;
	color: #000058;
}

.box-act p {
	margin-top: 1em;
}


/* ============================================================================
   18. МЕДИА-ЗАПРОСЫ
   ============================================================================ */

/* Общие медиа-запросы */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    /* Главная страница */
    .index-page .container {
        padding: 15px;
    }

    .index-page .header h1 {
        font-size: 2rem;
    }

    .index-page .header p {
        font-size: 1rem;
    }

    .index-page .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .index-page .gallery-item {
        padding: 20px;
    }

    .index-page .gallery-item .btn {
        display: block;
        margin: 10px auto;
        width: fit-content;
    }

    /* Личный кабинет */
    .lk-page .header {
        padding: 1rem;
    }

    .lk-page .header-content {
        padding: 0 1rem;
    }

    .lk-page .logo {
        font-size: 1.2rem;
    }

    .menu-toggle {
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
    }

    .lk-page .container {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }

    .lk-page .main-content {
        padding: 1.5rem;
    }

    .lk-page .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .lk-page .stat-card {
        padding: 1rem;
    }

    .lk-page .stat-value {
        font-size: 1.5rem;
    }

    .lk-page .action-buttons {
        flex-direction: column;
    }

    .lk-page .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .balance-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .balance-icon {
        font-size: 2.5rem;
    }

    .balance-value {
        font-size: 1.5rem;
    }

    .lk-page .content {
        padding-bottom: 80px;
    }

    /* Редактирование профиля */
    .md-page .container {
        padding: 1rem;
    }

    .md-page .page-title {
        font-size: 2rem;
    }

    .md-page .page-subtitle {
        font-size: 1rem;
    }

    .md-page .profile-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .md-page .profile-content {
        padding: 1.5rem;
    }

    .md-page .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .md-page .button-group {
        flex-direction: column;
    }

    .md-page .btn-save,
    .md-page .btn-cancel {
        width: 100%;
    }

    .md-page .content {
        padding-bottom: 100px;
    }

    /* Переключатель версий */
    .version-toggle {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
    }
    
    .version-toggle-content {
        gap: 8px;
    }
    
    .version-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .version-text {
        display: none;
    }
    
    .device-info {
        bottom: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 0.75rem;
        max-width: 150px;
    }

    /* Показываем мобильные элементы, скрываем десктопные */
    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .hide-on-mobile {
        display: none;
    }
    
    .hide-on-desktop {
        display: block;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Главная страница */
    .index-page .header h1 {
        font-size: 1.8rem;
    }

    .index-page .gallery-item {
        padding: 15px;
    }

    .index-page .gallery-item h3 {
        font-size: 1.2rem;
    }

    /* Личный кабинет */
    .lk-page .stats-grid {
        grid-template-columns: 1fr;
    }

    .lk-page .main-content {
        padding: 1rem;
    }

    .lk-page .welcome-card {
        padding: 1rem;
    }

    .lk-page .user-avatar-large {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Редактирование профиля */
    .md-page .page-title {
        font-size: 1.8rem;
    }

    .md-page .profile-content {
        padding: 1rem;
    }

    .md-page .mobile-profile-avatar {
        padding: 1rem;
    }

    .md-page .mobile-avatar-image {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .md-page .mobile-avatar-upload {
        width: 30px;
        height: 30px;
    }

    .md-page .mobile-tabs {
        padding: 0.25rem;
    }

    .md-page .mobile-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-width: 100px;
    }

    .md-page .mobile-form-section {
        padding: 1rem;
    }

    /* Переключатель версий */
    .version-toggle {
        top: 5px;
        right: 5px;
        padding: 6px 10px;
    }
    
    .version-toggle-label {
        display: none;
    }
    
    .version-toggle-content {
        gap: 5px;
    }
    
    .version-btn {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
    
    .device-info {
        bottom: 5px;
        left: 5px;
        padding: 6px 10px;
        font-size: 0.7rem;
        max-width: 120px;
    }
}

/* Стили для планшетов */
@media (min-width: 769px) and (max-width: 1024px) {
    .lk-page .container {
        padding: 1.5rem;
    }

    .lk-page .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lk-page .action-buttons {
        flex-wrap: wrap;
    }

    .md-page .container {
        padding: 1.5rem;
    }

    .md-page .form-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .md-page .button-group {
        flex-wrap: wrap;
    }
}

.oferta p { text-indent:1.5em; }
.oferta h2 { text-align: center; }
.oferta table {
	margin:0 auto;
	border: none;
	border-collapse: collapse;
}
.oferta table td,.oferta table th {
	border:solid 1px black;
	padding: 0 5px;
}

.profileradio + label {
}
.profileradio:checked + label {
	font-weight:bold;
}
/*
.profileradio + label::before {
	border:1px solid #ccc;
	box-sizing:content-box;
	content:"";
	display:inline-block;
	height:12px;
	margin:0 5px 2px 0;
	padding:0 2px 4px;
	text-align:center;
	vertical-align:middle;
	width:12px;
	border-radius:50%;
	color:#8c8f94;
}
.profileradio:checked + label::before {
	background:#4C8CBD;
}
*/

/* Контейнер для всех всплывающих окон */
#popups-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999; /* поверх всех элементов */
  display: flex;
  flex-direction: column;
  gap: 15px; /* отступ между окнами */
  transition: height 0.3s ease;
}

/* Стиль отдельного окна */
.popup-window {
  background: #fbe6e6;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 300px;
  padding: 5px;
  position: relative;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(0);
}
.popup-window.closing {
  opacity: 0;
  transform: translateY(-10px); /* лёгкий подъём при исчезновении */
}

.popup-title {
  font-weight: bold;
  margin-bottom: 0;
  margin-right: 30px;
  color: #333;
}

.popup-content {
  color: #555;
  line-height: 1.4;
}

/* Кнопка закрытия */
.popup-close {
  position: absolute;
  top: 5px;
  right: 10px;
  cursor: pointer;
  font-size: 1.1em;
  color: #888;
  font-weight:bold;
  padding:0;
  height:24px;
}

.popup-close:hover {
  color: #333;
}

.popup-close svg {
  stroke: #888; /* цвет */
}
.popup-close:hover svg {
  stroke: #333;
}
