/* ============================================================================
   ОБЩИЕ СТИЛИ
   ============================================================================ */

:root {
    /* Черно-желтая тема Python */
    --primary-color: #FFD43B;
    --secondary-color: #FFC107;
    --success-color: #4CAF50;
    --danger-color: #FF5252;
    --warning-color: #FFD43B;
    --info-color: #2196F3;
    --dark-color: #1a1a1a;
    --darker-color: #0d0d0d;
    --light-color: #2d2d2d;
    --text-color: #ffffff;
    --text-muted: #cccccc;
    --border-color: #555555;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.8);
    --gradient-primary: linear-gradient(135deg, #FFD43B 0%, #FFA000 100%);
    --gradient-success: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--darker-color);
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255, 212, 59, 0.03) 35px, rgba(255, 212, 59, 0.03) 70px),
        linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    font-size: 80%; /* Уменьшаем базовый размер шрифта на 20% (было 90%) */
}

.container {
    max-width: 1000px; /* Еще уменьшили с 1100px */
    margin: 0 auto;
    padding: 0 12px; /* Еще уменьшили с 15px */
}

/* ============================================================================
   НАВИГАЦИЯ
   ============================================================================ */

.navbar {
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(255, 212, 59, 0.3);
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.6rem 0; /* Еще уменьшили с 0.8rem */
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 6px; /* Еще уменьшили с 8px */
    font-size: 1.2rem; /* Еще уменьшили с 1.35rem */
    font-weight: 700;
    color: var(--primary-color);
}

.navbar-brand i {
    font-size: 1.6rem; /* Еще уменьшили с 1.8rem */
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem 1rem;
    background: var(--light-color);
    border-radius: 50px;
}

.online-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.online-indicator.online {
    background: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.username {
    font-weight: 600;
    color: var(--text-color);
}

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

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

.btn-primary {
    background: var(--gradient-primary);
    color: #000000;
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 212, 59, 0.5);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    font-weight: 700;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-outline-danger {
    background: transparent;
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ============================================================================
   СООБЩЕНИЯ
   ============================================================================ */

.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    background: var(--success-color);
    color: white;
}

.alert-danger {
    background: var(--danger-color);
    color: white;
}

.alert-warning {
    background: var(--warning-color);
    color: white;
}

.alert-info {
    background: var(--info-color);
    color: white;
}

.alert .close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
}

/* ============================================================================
   ОСНОВНОЙ КОНТЕНТ
   ============================================================================ */

.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.card {
    background: var(--light-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 212, 59, 0.2);
    padding: 2rem;
    margin-bottom: 2rem;
}

.card-header {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ============================================================================
   ФОРМЫ
   ============================================================================ */

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

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: #000000;
    color: #ffffff;
    border: 2px solid #666666;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: #888888;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--primary-color);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    margin-top: 4rem;
}

.footer p {
    margin: 0.5rem 0;
}

.security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--success-color);
    font-weight: 600;
}

/* ============================================================================
   АДМИН ПАНЕЛЬ
   ============================================================================ */

.admin-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
    overflow-x: visible;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-create-user {
    background: var(--gradient-success);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-create-user:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

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

.stat-card {
    background: var(--gradient-dark);
    border: 1px solid rgba(255, 212, 59, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 212, 59, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.green {
    background: var(--gradient-success);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
}

.stat-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.stat-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.card {
    background: var(--gradient-dark);
    border: 1px solid rgba(255, 212, 59, 0.2);
    border-radius: 12px;
    overflow: visible;
    margin-bottom: 2rem;
    width: 100%;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 212, 59, 0.2);
    font-size: 1.3rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.users-table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    position: relative;
}

/* Подсказка о скролле */
.users-table-wrapper::after {
    content: '→ Скролльте таблицу вправо для просмотра действий →';
    position: sticky;
    right: 0;
    top: 10px;
    background: linear-gradient(90deg, transparent, rgba(255, 212, 59, 0.9) 20%);
    color: var(--dark-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none;
    z-index: 10;
    float: right;
    margin-top: -3rem;
}

.users-table-wrapper::-webkit-scrollbar {
    height: 12px;
}

.users-table-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 212, 59, 0.1);
    border-radius: 10px;
}

.users-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.users-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.users-table {
    width: 100%;
    min-width: 1400px;
    border-collapse: collapse;
    table-layout: auto;
}

.users-table th,
.users-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 212, 59, 0.1);
    visibility: visible !important;
    display: table-cell !important;
}

.users-table th:last-child,
.users-table td:last-child {
    min-width: 220px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.users-table th {
    background: rgba(255, 212, 59, 0.1);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-table tbody tr {
    transition: all 0.3s ease;
}

.users-table tbody tr:hover {
    background: rgba(255, 212, 59, 0.05);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.status-indicator.online {
    background: var(--success-color);
    box-shadow: 0 0 10px var(--success-color);
    animation: pulse 2s infinite;
}

.status-indicator.offline {
    background: #666;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.telegram-badge {
    background: linear-gradient(135deg, #0088cc 0%, #0077b3 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.access-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.access-badge.full {
    background: var(--gradient-success);
    color: white;
}

.access-badge.demo {
    background: linear-gradient(135deg, #FFA000 0%, #F57C00 100%);
    color: white;
}

.mini-progress {
    width: 80px;
    height: 20px;
    background: rgba(255, 212, 59, 0.1);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.mini-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.mini-progress span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-color);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.action-buttons {
    display: flex !important;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    min-width: 200px;
    visibility: visible !important;
    opacity: 1 !important;
}

.btn-icon {
    background: rgba(255, 212, 59, 0.1) !important;
    border: 1px solid rgba(255, 212, 59, 0.3) !important;
    color: var(--primary-color) !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 0.85rem !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.btn-icon:hover {
    background: var(--primary-color);
    color: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(255, 212, 59, 0.4);
}

.btn-icon.success {
    border-color: rgba(76, 175, 80, 0.5);
    color: var(--success-color);
}

.btn-icon.success:hover {
    background: var(--success-color);
    color: white;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.4);
}

.btn-icon.warning {
    border-color: rgba(255, 152, 0, 0.5);
    color: #FFA000;
}

.btn-icon.warning:hover {
    background: #FFA000;
    color: white;
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.4);
}

.btn-icon.danger {
    border-color: rgba(255, 82, 82, 0.5);
    color: var(--danger-color);
}

.btn-icon.danger:hover {
    background: var(--danger-color);
    color: white;
    box-shadow: 0 3px 10px rgba(255, 82, 82, 0.4);
}

.logs-list {
    padding: 1rem;
}

.log-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-left: 3px solid var(--primary-color);
    background: rgba(255, 212, 59, 0.05);
    margin-bottom: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.log-item:hover {
    background: rgba(255, 212, 59, 0.1);
    transform: translateX(5px);
}

.log-icon {
    font-size: 1.5rem;
}

.log-content {
    flex: 1;
}

.log-content strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
}

.log-meta {
    text-align: right;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: #FFA000; }
.text-info { color: var(--info-color); }
.text-muted { color: var(--text-muted); }

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--gradient-dark);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    margin: 10% auto;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(255, 212, 59, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 212, 59, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 1.5rem;
}

.unique-link {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: rgba(255, 212, 59, 0.1);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 212, 59, 0.3);
}

.unique-link code {
    flex: 1;
    background: var(--darker-color);
    padding: 0.75rem;
    border-radius: 6px;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

/* ============================================================================
   АДАПТИВНОСТЬ
   ============================================================================ */

/* Burger menu для мобильных */
.navbar-toggle {
    display: none;
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.navbar-toggle:hover {
    background: var(--primary-color);
    color: #000;
}

/* Планшеты */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .navbar-menu {
        gap: 1rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 0;
    }
    
    .navbar .container {
        flex-wrap: wrap;
        position: relative;
    }
    
    .navbar-toggle {
        display: block;
        margin-left: auto;
    }
    
    .navbar-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
        gap: 0.5rem;
        background: rgba(26, 26, 26, 0.98);
        padding: 1rem;
        border-radius: 12px;
        border: 1px solid rgba(255, 212, 59, 0.3);
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-user {
        width: 100%;
        justify-content: space-between;
        padding: 0.8rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-brand i {
        font-size: 1.5rem;
    }
    
    .flash-messages {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 70px;
    }
    
    .alert {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .card {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .card-header {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Маленькие телефоны */
@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-brand i {
        font-size: 1.2rem;
    }
    
    .card {
        padding: 0.8rem;
    }
    
    .card-header {
        font-size: 1rem;
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .alert {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .footer {
        padding: 1.5rem 0;
        font-size: 0.85rem;
    }
}

/* ============================================================================
   УТИЛИТЫ
   ============================================================================ */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

/* ============================================
   📱 МОБИЛЬНАЯ АДАПТАЦИЯ - НАВИГАЦИЯ
   ============================================ */

/* Улучшение навигации для мобильных */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
        gap: 0.5rem;
    }
    
    .navbar-brand i {
        font-size: 1.3rem;
    }
    
    .navbar-toggle {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        border-radius: 10px;
    }
    
    .navbar-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(20, 20, 20, 0.98);
        backdrop-filter: blur(10px);
        padding: 80px 20px 20px 20px;
        transition: left 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        border-right: 2px solid rgba(255, 212, 59, 0.4);
    }
    
    .navbar-menu.active {
        left: 0;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        margin: 0.5rem 0;
        border-radius: 12px;
        font-size: 1rem;
        min-height: 48px;
        background: rgba(255, 212, 59, 0.05);
        border: 1px solid rgba(255, 212, 59, 0.2);
    }
    
    .nav-link.active {
        background: rgba(255, 212, 59, 0.2);
        border-color: rgba(255, 212, 59, 0.5);
    }
    
    .nav-link i {
        margin-right: 0.75rem;
        font-size: 1.1rem;
    }
    
    .nav-user {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.5rem 1rem;
        margin-top: 2rem;
        border-top: 1px solid rgba(255, 212, 59, 0.2);
    }
    
    .nav-user .username {
        font-size: 1rem;
        padding: 0.75rem;
        background: rgba(255, 212, 59, 0.1);
        border-radius: 10px;
        text-align: center;
    }
    
    .nav-user .btn {
        width: 100%;
        padding: 0.75rem;
        min-height: 48px;
    }
    
    /* Overlay для navbar */
    .navbar::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.8);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
        z-index: 999;
    }
    
    .navbar-menu.active ~ .navbar::after {
        opacity: 1;
        pointer-events: all;
    }
}

/* ============================================
   📱 МОБИЛЬНАЯ АДАПТАЦИЯ - ФОРМЫ LOGIN
   ============================================ */

/* Добавляем в login.css */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
        min-height: 100vh;
    }
    
    .login-box {
        padding: 2rem 1.5rem;
        border-radius: 16px;
        max-width: 100%;
    }
    
    .login-header {
        margin-bottom: 2rem;
    }
    
    .login-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .form-control {
        padding: 0.85rem 1rem;
        font-size: 16px !important; /* Предотвращает zoom на iOS */
        border-radius: 12px;
        min-height: 48px;
    }
    
    .input-icon {
        padding: 0.85rem 1rem;
        font-size: 1.1rem;
    }
    
    .btn-primary {
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
        min-height: 50px;
        border-radius: 12px;
    }
    
    .form-footer {
        margin-top: 1.5rem;
        font-size: 0.9rem;
    }
    
    .form-link {
        font-size: 0.9rem;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .login-container {
        padding: 1.5rem;
    }
    
    .login-box {
        padding: 2.5rem 2rem;
        max-width: 450px;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .form-control {
        font-size: 16px !important;
        min-height: 48px;
    }
    
    .btn-primary {
        min-height: 50px;
    }
}

/* ============================================
   📱 МОБИЛЬНАЯ АДАПТАЦИЯ - ФОРМЫ REGISTER
   ============================================ */

/* Добавляем в register.css */
@media (max-width: 480px) {
    .register-container {
        padding: 1rem;
        min-height: 100vh;
    }
    
    .register-box {
        padding: 2rem 1.5rem;
        border-radius: 16px;
        max-width: 100%;
    }
    
    .register-header {
        margin-bottom: 2rem;
    }
    
    .register-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .register-subtitle {
        font-size: 0.9rem;
    }
    
    /* Все input поля */
    .form-control,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        padding: 0.85rem 1rem;
        font-size: 16px !important; /* Критично для iOS */
        border-radius: 12px;
        min-height: 48px;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .btn-register {
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
        min-height: 50px;
        border-radius: 12px;
    }
    
    /* Чекбоксы и радио кнопки */
    .checkbox-label,
    .radio-label {
        min-height: 44px;
        padding: 0.75rem;
    }
    
    /* Шаги регистрации (если есть) */
    .step-indicator {
        margin-bottom: 1.5rem;
    }
    
    .step {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .form-footer {
        margin-top: 1.5rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .register-container {
        padding: 1.5rem;
    }
    
    .register-box {
        padding: 2.5rem 2rem;
        max-width: 500px;
    }
    
    .register-title {
        font-size: 2rem;
    }
    
    .form-control,
    input,
    select,
    textarea {
        font-size: 16px !important;
        min-height: 48px;
    }
    
    .btn-register {
        min-height: 50px;
    }
}

/* ============================================
   📱 ОБЩИЕ УЛУЧШЕНИЯ ДЛЯ ФОРМ
   ============================================ */

/* Touch-friendly для всех форм */
@media (hover: none) and (pointer: coarse) {
    button,
    .btn,
    input[type="submit"],
    input[type="button"] {
        min-height: 48px;
        padding: 0.75rem 1.5rem;
    }
    
    /* Увеличиваем активную область */
    input,
    select,
    textarea {
        touch-action: manipulation;
    }
    
    /* Убираем подсветку tap на iOS */
    button,
    .btn,
    a {
        -webkit-tap-highlight-color: rgba(255, 212, 59, 0.2);
    }
}

/* Предотвращение zoom при фокусе input на iOS */
input,
select,
textarea {
    font-size: 16px !important;
}

/* Улучшение прокрутки */
.login-box,
.register-box,
.navbar-menu {
    -webkit-overflow-scrolling: touch;
}

