/* =====================================================
   ЕДИНАЯ СИСТЕМА БРЕЙКПОИНТОВ
   Для всех устройств и шаблонов
   ===================================================== */

:root {
    --breakpoint-xs: 0px;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
}

/* 1. МОБИЛЬНЫЕ (до 576px) */
@media (max-width: 575.98px) {
    .content-wrapper { padding: 10px !important; }
    .navbar { padding-left: 1rem !important; padding-right: 1rem !important; }
    .navbar-brand { font-size: 0.9rem !important; }
    
    h1 { font-size: 1.4rem !important; }
    h2 { font-size: 1.3rem !important; }
    h3 { font-size: 1.2rem !important; }
    h4 { font-size: 1.1rem !important; }
    h5 { font-size: 1rem !important; }
    h6 { font-size: 0.9rem !important; }
    
    .btn {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.85rem !important;
        min-height: 44px !important;
        min-width: 44px !important;
        border-radius: 10px !important;
    }
    .btn-sm { padding: 0.4rem 0.6rem !important; font-size: 0.75rem !important; min-height: 38px !important; }
    .btn-lg { padding: 0.6rem 1.2rem !important; font-size: 1rem !important; min-height: 50px !important; }
    
    .card { border-radius: 12px !important; margin-bottom: 0.75rem !important; }
    .card-body { padding: 0.75rem !important; }
    .card-title { font-size: 1rem !important; }
    
    .table { font-size: 0.85rem !important; }
    .form-control, .form-select { font-size: 16px !important; padding: 0.6rem 0.8rem !important; }
    .badge { font-size: 0.7rem !important; padding: 0.3em 0.5em !important; }
    
    .modal-dialog { margin: 0.5rem !important; }
    .modal-content { border-radius: 15px !important; }
    
    .gap-2 { gap: 0.5rem !important; }
    .d-flex.gap-2 { flex-wrap: wrap; }
    .d-flex.gap-2 .btn { flex: 1 1 100%; text-align: center; }
}

/* 2. ТЕЛЕФОНЫ ЛАНДШАФТНЫЕ (576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .content-wrapper { padding: 1.5rem !important; }
    .navbar { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }

    h1 { font-size: 1.6rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.4rem !important; }
    h4 { font-size: 1.3rem !important; }
    h5 { font-size: 1.1rem !important; }

    .btn { min-height: 40px !important; padding: 0.45rem 0.8rem !important; font-size: 0.9rem !important; }
    .btn-sm { min-height: 35px !important; padding: 0.35rem 0.6rem !important; font-size: 0.8rem !important; }
    .btn-lg { min-height: 48px !important; padding: 0.55rem 1.1rem !important; font-size: 0.95rem !important; }

    .card-body { padding: 1rem !important; }
    .form-control, .form-select { font-size: 15px !important; }
    .site-footer { margin-bottom: 80px !important; }
}

/* 3. ПЛАНШЕТЫ ПОРТРЕТНЫЕ (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .content-wrapper { padding: 1.5rem !important; padding-bottom: 2rem !important; }
    .navbar { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
    
    h1 { font-size: 1.8rem !important; }
    h2 { font-size: 1.6rem !important; }
    h3 { font-size: 1.5rem !important; }
    h4 { font-size: 1.4rem !important; }
    h5 { font-size: 1.2rem !important; }
    
    .btn { min-height: 38px !important; padding: 0.4rem 0.75rem !important; font-size: 0.9rem !important; border-radius: 10px !important; }
    .btn-sm { min-height: 32px !important; padding: 0.3rem 0.55rem !important; font-size: 0.8rem !important; }
    .btn-lg { min-height: 46px !important; padding: 0.5rem 1.05rem !important; font-size: 0.95rem !important; }
    
    .row > * { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
    .card-body { padding: 1.25rem !important; }
    .table { font-size: 0.95rem !important; }
}

/* 4. ПЛАНШЕТЫ ЛАНДШАФТНЫЕ (992px - 1024px) */
@media (min-width: 992px) and (max-width: 1024px) {
    .content-wrapper { padding: 1.75rem !important; }
    .navbar { padding-left: 2rem !important; padding-right: 2rem !important; }

    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.8rem !important; }
    h3 { font-size: 1.6rem !important; }
    h4 { font-size: 1.5rem !important; }

    .btn { min-height: 40px !important; padding: 0.45rem 0.85rem !important; font-size: 0.95rem !important; }
    .btn-sm { min-height: 34px !important; padding: 0.35rem 0.65rem !important; }
    .btn-lg { min-height: 48px !important; padding: 0.55rem 1.15rem !important; }

    /* Кнопки в шапке - уменьшенные отступы */
    .navbar .btn { padding: 0.3rem 0.5rem !important; }
    .navbar .btn i { font-size: 1rem !important; }
    .navbar .btn-sm { padding: 0.25rem 0.4rem !important; }

    .card-body { padding: 1.5rem !important; }
}

/* 5. ДЕСКТОПЫ (1025px - 1279px) */
@media (min-width: 1025px) and (max-width: 1279.98px) {
    .content-wrapper { padding: 2rem !important; }
    .navbar { padding-left: 2rem !important; padding-right: 2rem !important; }
    
    h1 { font-size: 2.2rem !important; }
    h2 { font-size: 2rem !important; }
    h3 { font-size: 1.8rem !important; }
    
    .btn { min-height: 42px !important; padding: 0.5rem 1rem !important; font-size: 1rem !important; }
    .btn-sm { min-height: 36px !important; padding: 0.4rem 0.7rem !important; }
    .btn-lg { min-height: 50px !important; padding: 0.6rem 1.25rem !important; }
    
    .card-body { padding: 1.75rem !important; }
}

/* 6. БОЛЬШИЕ ДЕСКТОПЫ (от 1280px) */
@media (min-width: 1280px) {
    .content-wrapper { padding: 2.5rem !important; padding-bottom: 3rem !important; }
    .navbar { padding-left: 3rem !important; padding-right: 3rem !important; }
    
    h1 { font-size: 2.5rem !important; }
    h2 { font-size: 2.2rem !important; }
    h3 { font-size: 2rem !important; }
    
    .btn { min-height: 44px !important; padding: 0.55rem 1.1rem !important; }
    .btn-sm { min-height: 38px !important; }
    .btn-lg { min-height: 52px !important; padding: 0.65rem 1.35rem !important; }
    
    .card-body { padding: 2rem !important; }
}

/* 7. ЛАНДШАФТ (низкая высота) */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-content { max-height: 90vh !important; }
}

/* 8. ОЧЕНЬ МАЛЕНЬКИЕ ТЕЛЕФОНЫ (до 380px) */
@media (max-width: 379.98px) {
    .content-wrapper { padding: 8px !important; }
    .navbar { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
    .navbar-brand { font-size: 0.85rem !important; }

    h4 { font-size: 1rem !important; }
    h5 { font-size: 0.95rem !important; }
    h6 { font-size: 0.85rem !important; }

    .btn { padding: 0.45rem 0.65rem !important; font-size: 0.8rem !important; }
    .btn-sm { padding: 0.35rem 0.55rem !important; font-size: 0.7rem !important; }
}

/* 9. СКРЫТИЕ НИЖНЕГО МЕНЮ НА ДЕСКТОПЕ - УДАЛЕНО (меню отключено) */

/* 10. УНИВЕРСАЛЬНЫЕ КЛАССЫ */
.hide-mobile { display: none !important; }
@media (min-width: 768px) { .hide-mobile { display: block !important; } }

.hide-tablet { display: block !important; }
@media (min-width: 768px) and (max-width: 1024px) { .hide-tablet { display: none !important; } }

.hide-desktop { display: block !important; }
@media (min-width: 1025px) { .hide-desktop { display: none !important; } }

/* Адаптивная сетка */
.responsive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 576px) { .responsive-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .responsive-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }
@media (min-width: 992px) { .responsive-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
@media (min-width: 1280px) { .responsive-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem; } }

/* iOS zoom prevention */
@media (max-width: 768px) {
    input, select, textarea { font-size: 16px !important; }
}

/* =====================================================
   СТИЛИ ДЛЯ СТРАНИЦЫ ВХОДА (login.html)
   Изолированно, используя префикс .login-page
   ===================================================== */

/* Анимации */
@keyframes login-fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes login-gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes login-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
@keyframes login-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

body.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%;
    animation: login-gradientShift 5s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
}

/* Декоративные круги на фоне */
body.login-page::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: login-float 6s ease-in-out infinite;
    top: 10%;
    left: 10%;
}

body.login-page::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: login-float 6s ease-in-out infinite;
    bottom: 10%;
    right: 10%;
    animation-delay: -3s;
}

/* Музыкальные инструменты на фоне */
.music-instruments {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.music-icon-bg {
    position: absolute;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.15);
    animation: login-floatInstrument 8s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.music-icon-bg:nth-child(1) { top: 10%; left: 5%; font-size: 4rem; animation-delay: 0s; }
.music-icon-bg:nth-child(2) { top: 20%; right: 10%; font-size: 3.5rem; animation-delay: -2s; }
.music-icon-bg:nth-child(3) { bottom: 30%; left: 8%; font-size: 3rem; animation-delay: -4s; }
.music-icon-bg:nth-child(4) { bottom: 15%; right: 15%; font-size: 4rem; animation-delay: -6s; }
.music-icon-bg:nth-child(5) { top: 50%; left: 50%; font-size: 5rem; animation-delay: -8s; }
.music-icon-bg:nth-child(6) { top: 70%; left: 20%; font-size: 2.5rem; animation-delay: -1s; }
.music-icon-bg:nth-child(7) { top: 40%; right: 25%; font-size: 3rem; animation-delay: -5s; }

@keyframes login-floatInstrument {
    0%, 100% { transform: translateY(0) rotate(-10deg) scale(1); opacity: 0.15; }
    25% { transform: translateY(-30px) rotate(5deg) scale(1.1); opacity: 0.25; }
    50% { transform: translateY(-15px) rotate(-5deg) scale(0.9); opacity: 0.2; }
    75% { transform: translateY(-35px) rotate(10deg) scale(1.05); opacity: 0.25; }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    width: 90%;
    position: relative;
    z-index: 1;
    animation: login-fadeInUp 0.6s ease-out;
}

.login-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.login-icon {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-icon i {
    font-size: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: login-pulse 2s ease-in-out infinite;
    display: inline-block;
}

.login-header {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.login-title {
    text-align: center;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 2.2rem;
    display: block;
    width: 100%;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.login-subtitle {
    text-align: center;
    font-size: 0.85rem;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-top: 5px;
    display: block;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(102, 126, 234, 0.15);
}

/* Поля форм */
.login-card .form-control {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.login-card .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.login-card .form-control::placeholder { color: #CBD6E4; opacity: 1; }
.login-card .form-label { font-weight: 600; color: #495057; margin-bottom: 8px; }
.login-card .form-text { color: #6c757d; font-size: 13px; }

/* Кнопки */
.login-card .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-card .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.login-card .btn-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-card .btn-telegram:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 136, 204, 0.4);
    background: linear-gradient(135deg, #0066aa 0%, #0088cc 100%);
    color: white;
}

/* Разделитель */
.login-card .divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
}

.login-card .divider::before,
.login-card .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.login-card .divider span {
    padding: 0 15px;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

/* Сообщения об ошибках */
.login-card .alert-danger {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    animation: login-fadeInUp 0.5s ease-out;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* Иконка в поле ввода */
.login-card .input-group { position: relative; }
.login-card .input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    z-index: 1;
}
.login-card .input-group .form-control { padding-left: 45px; }

/* =====================================================
   АДАПТИВНОСТЬ ДЛЯ LOGIN.HTML
   Используем те же брейкпоинты что и выше
   ===================================================== */

/* ОЧЕНЬ МАЛЕНЬКИЙ ТЕЛЕФОН (до 380px) */
@media (max-width: 379.98px) {
    .login-card { padding: 25px 15px !important; width: 95%; }
    .login-title { font-size: 1.3rem !important; letter-spacing: 1px !important; }
    .login-subtitle { font-size: 0.65rem !important; letter-spacing: 2px !important; }
    .login-icon i { font-size: 48px !important; }
    .login-header { margin-bottom: 15px !important; }
    .login-wrapper { padding: 10px !important; }
    .login-card .btn-primary, .login-card .btn-telegram { padding: 10px !important; font-size: 14px !important; }
}

/* МОБИЛЬНЫЙ ПОРТРЕТ (380px - 575px) */
@media (min-width: 380px) and (max-width: 575.98px) {
    .login-card { padding: 30px 20px !important; width: 92%; }
    .login-title { font-size: 1.5rem !important; letter-spacing: 2px !important; }
    .login-subtitle { font-size: 0.7rem !important; letter-spacing: 3px !important; }
    .login-icon i { font-size: 56px !important; }
    .login-header { margin-bottom: 20px !important; }
    .login-wrapper { padding: 15px !important; }
    .login-card .btn-primary, .login-card .btn-telegram { padding: 11px !important; font-size: 15px !important; min-height: 44px !important; }
}

/* ТЕЛЕФОН ЛАНДШАФТ (576px - 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .login-card { padding: 35px 25px !important; max-width: 400px; }
    .login-title { font-size: 1.7rem !important; }
    .login-subtitle { font-size: 0.75rem !important; letter-spacing: 4px !important; }
    .login-icon i { font-size: 64px !important; }
    .login-card .btn-primary, .login-card .btn-telegram { padding: 11px !important; font-size: 15px !important; min-height: 40px !important; }
}

/* ПЛАНШЕТ ПОРТРЕТ (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .login-card { padding: 38px 30px !important; max-width: 410px; }
    .login-title { font-size: 1.9rem !important; }
    .login-subtitle { font-size: 0.8rem !important; letter-spacing: 5px !important; }
    .login-icon i { font-size: 72px !important; }
    .login-card .btn-primary, .login-card .btn-telegram { padding: 11px !important; font-size: 15px !important; min-height: 38px !important; }
}

/* ПЛАНШЕТ ЛАНДШАФТ (992px - 1024px) */
@media (min-width: 992px) and (max-width: 1024px) {
    .login-card { padding: 40px 35px !important; max-width: 415px; }
    .login-title { font-size: 2rem !important; }
    .login-subtitle { font-size: 0.82rem !important; }
    .login-icon i { font-size: 76px !important; }
}

/* ДЕСКТОП (1025px - 1280px) */
@media (min-width: 1025px) and (max-width: 1279.98px) {
    .login-card { padding: 40px 38px !important; max-width: 418px; }
    .login-title { font-size: 2.1rem !important; }
    .login-icon i { font-size: 78px !important; }
}

/* БОЛЬШОЙ ДЕСКТОП (от 1280px) */
@media (min-width: 1280px) {
    .login-card { padding: 40px 40px !important; max-width: 420px; }
    .login-title { font-size: 2.2rem !important; }
    .login-icon i { font-size: 80px !important; }
}

/* ЛАНДШАФТНЫЙ РЕЖИМ (низкая высота) */
@media (max-height: 500px) and (orientation: landscape) {
    .login-card { padding: 20px 25px !important; margin: 10px auto; }
    .login-header { margin-bottom: 15px !important; }
    .login-icon i { font-size: 50px !important; }
    .login-title { font-size: 1.4rem !important; }
    .login-subtitle { font-size: 0.6rem !important; }
}
