/* =========================================
    1. ОБЩИЙ КАРКАС
    ========================================= */
.obs-account-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
    line-height: 1.6;
    margin: 20px 0;
}

/* САЙДБАР */
.obs-aside {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* ОСНОВНОЙ КОНТЕНТ */
.obs-main-content {
    flex-grow: 1;
    background: #fff;
    padding: 40px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    min-height: 500px;
    position: relative; /* Для полоски загрузки */
    transition: opacity 0.3s ease;
}

/* Состояние при AJAX загрузке (вместо блюра) */
.obs-is-blur {
    opacity: 0.5;
    pointer-events: none;
}

/* =========================================
    2. САЙДБАР И МЕНЮ
    ========================================= */
.obs-user-preview {
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(to bottom, #fafafa, #fff);
    border-bottom: 1px solid #eee;
}

.obs-avatar-container {
    width: 90px;
    height: 90px;
    margin: 0 auto 15px !important;
    overflow: hidden;
    border-radius: 50% !important;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.obs-avatar-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.obs-user-name { font-size: 18px; font-weight: 700; color: #2c3338; margin-bottom: 5px; }
.obs-user-login { font-size: 13px; color: #888; }

ul.obs-menu-list { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.obs-menu-list a {
    display: flex; align-items: center; padding: 14px 25px;
    text-decoration: none !important; color: #555; font-size: 15px; font-weight: 500;
    transition: all 0.2s ease; border-left: 3px solid transparent; border-bottom: 1px solid #f9f9f9;
}
.obs-menu-list a:hover { background: #f8fbff; color: #0073aa; padding-left: 30px; }
.obs-menu-list .active-tab { 
    background: #f0f7ff !important; 
    color: #0073aa !important; 
    border-left: 4px solid #0073aa; 
    font-weight: 600; 
}
.obs-logout-link { color: #d63638 !important; }

/* =========================================
    3. КОНТЕНТНАЯ ОБЛАСТЬ (Авто-стили)
    ========================================= */
.obs-main-content h2 {
    margin-top: 0; margin-bottom: 25px; font-size: 24px; color: #222;
    border-bottom: 2px solid #f0f0f0; padding-bottom: 15px;
}

/* Сетка данных (Email, Регистрация и т.д.) */
.obs-data-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    padding: 15px 0;
    border-bottom: 1px solid #f9f9f9;
}
.obs-data-label { color: #888; font-size: 14px; font-weight: 500; }
.obs-data-value { font-weight: 500; color: #333; }

/* Бейджи */
.obs-badge-active {
    background: #e5f9e7; color: #2fb344;
    padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: bold;
}

/* Формы */
.obs-main-content input[type="text"],
.obs-main-content input[type="password"],
.obs-main-content input[type="email"],
.obs-main-content select,
.obs-main-content textarea {
    width: 100%; max-width: 450px; padding: 12px 15px;
    border: 1px solid #ddd; border-radius: 6px; font-size: 15px;
    margin-bottom: 15px; box-sizing: border-box;
}

.obs-main-content button, 
.obs-main-content input[type="submit"] {
    background: #0073aa; color: #fff !important;
    padding: 12px 25px; border: none; border-radius: 6px;
    font-size: 15px; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.obs-main-content button:hover { background: #005a87; }

/* Приветственный блок */
.obs-welcome-alert {
    margin-top: 30px; padding: 20px; background: #f0f7ff;
    border-radius: 8px; border-left: 4px solid #0073aa;
}

/* =========================================
    4. AJAX ПОЛОСКА ЗАГРУЗКИ
    ========================================= */
.obs-loader-bar {
    position: absolute; top: 0; left: 0; width: 0; height: 3px;
    background: #0073aa; z-index: 999; transition: width 0.4s ease;
}
.obs-loader-bar.is-loading {
    width: 75%;
    animation: obs_loader_pulse 1.5s infinite;
}
@keyframes obs_loader_pulse {
    0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; }
}

/* =========================================
    5. АДАПТИВНОСТЬ (МОБИЛКИ) - ОБНОВЛЕНО
    ========================================= */
@media (max-width: 900px) {
    .obs-account-wrapper { flex-direction: column; gap: 0; }
    .obs-aside { 
        width: 100%; 
        border-radius: 0; 
        border: none; 
        border-bottom: 1px solid #e5e5e5; 
        position: sticky; 
        top: 0; 
        z-index: 99;
    }
    .obs-main-content { width: 100%; padding: 25px; box-sizing: border-box; border-radius: 0; border: none; }
    
    /* Горизонтальный скролл меню на мобилках */
    .obs-menu-scroll-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        background: #fff;
    }
    .obs-menu-scroll-container::-webkit-scrollbar { display: none; }

    ul.obs-menu-list { display: flex !important; }
    .obs-menu-list li { flex: 0 0 auto; }
    .obs-menu-list a { 
        padding: 15px 20px; 
        border-left: none !important; 
        border-bottom: 3px solid transparent; 
        white-space: nowrap;
    }
    .obs-menu-list .active-tab { 
        border-bottom: 3px solid #0073aa; 
        background: transparent !important; 
    }

    .obs-data-grid {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 12px 0;
    }
    
    .obs-main-content input[type="text"],
    .obs-main-content input[type="password"],
    .obs-main-content input[type="email"] {
        max-width: 100%;
    }
}

/* =========================================
    6. СТИЛІ ДЛЯ ФОРМ АВТОРИЗАЦІЇ (auth.php)
    ========================================= */
.obs-auth-box {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.obs-auth-box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    text-align: center;
    color: #2c3338;
}

.obs-auth-box p {
    margin-bottom: 15px;
}

.obs-auth-box input[type="text"],
.obs-auth-box input[type="password"],
.obs-auth-box input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.obs-auth-box input:focus {
    border-color: #0042AB;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.obs-auth-box button {
    width: 100%;
    background: #0042AB;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.obs-auth-box button:hover {
    background: #0750c4;
}

.obs-auth-box a {
    color: #0042AB;
    text-decoration: none;
    font-size: 14px;
}

.obs-auth-box a:hover {
    text-decoration: underline;
}

.obs-msg {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}
.obs-msg-error { background: #fbeaea; color: #d63638; border: 1px solid #dc3232; }
.obs-msg-success { background: #ecf7ed; color: #46b450; border: 1px solid #46b450; }

/* =========================================
    7. СОВРЕМЕННЫЕ ПОДВКЛАДКИ (CHIPS)
    ========================================= */
.obs-subtabs-nav {
    display: flex;
    gap: 10px;
    padding: 5px;
    background: #f5f5f5;
    border-radius: 30px;
    margin-bottom: 30px;
    overflow-x: auto;
    scrollbar-width: none;
}
.obs-subtabs-nav::-webkit-scrollbar { display: none; }

.obs-sub-item {
    padding: 8px 20px;
    text-decoration: none !important;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.obs-sub-item:hover { color: #0042AB; }
.obs-sub-item.is-active {
    background: #0042AB;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(0,115,170,0.2);
}