/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.dashboard-header {
    position: relative;
    background: #0A1529;
    border-radius: 0 0 60px 60px;
    padding: 0;
    z-index: 10;
    overflow: hidden;
    aspect-ratio: 1920 / 450;
}

.dashboard-header-background {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    object-fit: cover;
}

.dashboard-header-container {
    max-width: 1820px;
    margin: 0 auto;
    padding: 30px 50px 0 50px;
    display: flex;
    align-items: center;
    gap: 50px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    pointer-events: none;
}

.dashboard-header-container > * {
    pointer-events: auto;
}

/* Logo */
.dashboard-logo {
    flex-shrink: 0;
    text-decoration: none;
    display: block;
    transition: opacity 0.2s ease;
}

.dashboard-logo:hover {
    opacity: 0.8;
}

.dashboard-logo a {
    font-family: 'TT Interfaces', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #FFFFFF;
    text-decoration: none;
}

.dashboard-logo img,
.dashboard-logo svg {
    display: block;
    height: 40px;
    width: auto;
}

/* Mobile Menu Toggle */
.dashboard-mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
    position: relative;
    z-index: 1002;
}

.dashboard-mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
}

/* Mobile Menu Overlay */
.dashboard-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0A1529;
    z-index: 1001;
    padding: 100px 30px 30px;
    overflow-y: auto;
}

.dashboard-mobile-menu.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dashboard-mobile-menu-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1003;
    transition: opacity 0.3s ease;
}

.dashboard-mobile-menu-close:hover {
    opacity: 0.7;
}

.dashboard-mobile-menu-close svg {
    display: block;
}

.dashboard-mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.dashboard-mobile-menu-nav .dashboard-nav-link {
    font-size: 18px;
    color: #FFFFFF;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-mobile-menu-nav .dashboard-nav-link i,
.dashboard-mobile-menu-nav .dashboard-nav-link svg {
    width: 20px;
    height: 20px;
    color: #FFFFFF;
}

.dashboard-mobile-menu-nav .dashboard-nav-link:hover {
    opacity: 0.7;
}

.dashboard-mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
}

.dashboard-user-info-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.dashboard-user-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dashboard-mobile-menu-actions .btn-outline {
    padding: 10px 30px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dashboard-mobile-menu-actions .btn-outline i,
.dashboard-mobile-menu-actions .btn-outline svg {
    width: 18px;
    height: 18px;
    color: #FFFFFF;
}

/* Header Navigation */
.dashboard-nav {
    display: flex;
    align-items: center;
    gap: 35px;
    margin-left: auto;
    margin-right: 0;
}

.dashboard-nav-link {
    font-size: 16px;
    color: #FFFFFF;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: opacity 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'TT Interfaces', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-nav-link:hover {
    opacity: 0.7;
}

.dashboard-nav-link.active {
    font-weight: 600;
}

.dashboard-nav-link i,
.dashboard-nav-link svg {
    width: 18px;
    height: 18px;
}

/* Dropdown */
.dashboard-dropdown {
    position: relative;
}

.dashboard-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #FFFFFF;
    background: none;
    border: none;
    cursor: pointer;
    letter-spacing: -0.01em;
    transition: all 0.2s ease;
    font-family: 'TT Interfaces', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dashboard-dropdown-toggle:hover {
    opacity: 0.7;
}

.dashboard-dropdown-toggle i,
.dashboard-dropdown-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.dashboard-dropdown:hover .dashboard-dropdown-toggle svg,
.dashboard-dropdown.open .dashboard-dropdown-toggle svg {
    transform: rotate(180deg);
}

.dashboard-dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 12px;
    z-index: 100;
}

.dashboard-dropdown:hover .dashboard-dropdown-menu,
.dashboard-dropdown.open .dashboard-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dashboard-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: #0A1529;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-size: 15px;
    letter-spacing: -0.01em;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: 'TT Interfaces', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dashboard-dropdown-item:hover {
    background: rgba(133, 109, 255, 0.1);
    transform: translateX(4px);
}

.dashboard-dropdown-item i,
.dashboard-dropdown-item svg {
    width: 20px;
    height: 20px;
    color: rgba(10, 21, 41, 0.6);
}

/* Buttons */
.btn-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: radial-gradient(33.27% 27.64% at 100% 33.1%, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%),
                radial-gradient(49.3% 49.3% at 30.99% 22.54%, #5200FF 0%, rgba(255, 255, 255, 0) 100%),
                radial-gradient(190.09% 190.9% at 59.68% 40.49%, #31B5FF 13.54%, #FF87C8 100%);
    border-radius: 41px;
    font-size: 16px;
    color: #FFFFFF;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
    font-family: 'TT Interfaces', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(49, 181, 255, 0.3);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 41px;
    font-size: 16px;
    color: #FFFFFF;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: background 0.2s, border-color 0.2s;
    background: none;
    cursor: pointer;
    font-family: 'TT Interfaces', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-support {
    width: 43px;
    height: 43px;
    border-radius: 50%;
    background: radial-gradient(33.27% 27.64% at 100% 33.1%, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%),
                radial-gradient(49.3% 49.3% at 30.99% 22.54%, #5200FF 0%, rgba(255, 255, 255, 0) 100%),
                radial-gradient(113.33% 115.76% at 59.68% 40.49%, #31B5FF 13.54%, #FF87C8 100%);
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-support:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(49, 181, 255, 0.3);
}

.btn-support svg {
    width: 16px;
    height: 16px;
}

/* Switch links in mobile menu - gradient styling for tariffs and context switches */
.dashboard-mobile-menu-nav .dashboard-switch-link {
    margin-top: 10px;
    padding: 10px 20px;
    background: radial-gradient(33.27% 27.64% at 100% 33.1%, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%),
                radial-gradient(49.3% 49.3% at 30.99% 22.54%, #5200FF 0%, rgba(255, 255, 255, 0) 100%),
                radial-gradient(190.09% 190.9% at 59.68% 40.49%, #31B5FF 13.54%, #FF87C8 100%);
    border-radius: 41px;
    color: #FFFFFF !important;
    width: auto;
    justify-content: center;
    font-weight: 400;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-mobile-menu-nav .dashboard-switch-link:first-of-type {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.dashboard-mobile-menu-nav .dashboard-switch-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(49, 181, 255, 0.3);
}

/* User Info */
.dashboard-user {
    display: flex;
    align-items: center;
    gap: 30px;
}

.dashboard-user-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    pointer-events: auto;
}

.dashboard-user-profile:hover {
    opacity: 0.9;
}

.dashboard-avatar {
    width: 47px;
    height: 47px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.dashboard-avatar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 2px;
    background: radial-gradient(113.33% 115.76% at 59.68% 40.49%, #31B5FF 13.54%, #FF87C8 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

/* Убираем обводку для дефолтного аватара */
.dashboard-avatar.has-default-avatar::before {
    display: none;
}

.dashboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.dashboard-avatar i,
.dashboard-avatar svg {
    width: 24px;
    height: 24px;
    color: #FFFFFF;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Специфичные стили для шапки - переопределяем dashboard.css */
.dashboard-header .dashboard-user-profile .dashboard-avatar {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.dashboard-header .dashboard-user-profile .dashboard-avatar i,
.dashboard-header .dashboard-user-profile .dashboard-avatar svg {
    color: #FFFFFF !important;
}

.dashboard-user-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dashboard-user-name {
    font-size: 16px;
    color: #FFFFFF;
    letter-spacing: -0.01em;
    font-weight: 500;
}

/* Специфичные стили для шапки - переопределяем dashboard.css */
.dashboard-header .dashboard-user-profile .dashboard-user-name {
    color: #FFFFFF !important;
}

.dashboard-header .dashboard-user-profile .dashboard-user-email {
    color: rgba(255, 255, 255, 0.6) !important;
}

.dashboard-header .dashboard-user-profile {
    background: transparent !important;
    border-color: transparent !important;
}

.dashboard-header .dashboard-user-profile:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.dashboard-user-email {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: -0.01em;
}

.settings-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #FFFFFF;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.dashboard-user-profile:hover .settings-icon {
    opacity: 1;
}

.settings-icon i {
    width: 20px;
    height: 20px;
}

.dashboard-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 41px;
    font-size: 16px;
    color: #FFFFFF;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: background 0.2s, border-color 0.2s;
}

.dashboard-logout:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.dashboard-logout i {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet - 1200px */
@media (max-width: 1200px) {
    .dashboard-header {
        border-radius: 0 0 50px 50px;
    }
    
    .dashboard-header-background {
        border-radius: 0 0 50px 50px;
    }
    
    .dashboard-header-inner {
        padding: 40px 40px 0 40px;
        gap: 30px;
    }
    
    .dashboard-nav {
        gap: 20px;
    }
}

/* Tablet/Mobile - 968px */
@media (max-width: 968px) {
    .dashboard-header {
        border-radius: 0 0 40px 40px;
    }
    
    .dashboard-header-background {
        border-radius: 0 0 40px 40px;
    }
    
    .dashboard-header-inner {
        padding: 30px 30px 0 30px;
    }
    
    .dashboard-nav {
        display: none;
    }
    
    .dashboard-mobile-menu-toggle {
        display: block;
        order: 2;
        margin-right: -32px;
    }
    
    .dashboard-logo {
        order: 1;
        margin-right: auto;
        margin-left: -32px;
    }
    
    .dashboard-logo img,
    .dashboard-logo svg {
        height: 24px;
    }
    
    .dashboard-user {
        display: none;
    }
}

/* Mobile - 768px */
@media (max-width: 768px) {
    .dashboard-header {
        border-radius: 0 0 30px 30px;
    }
    
    .dashboard-header-background {
        border-radius: 0 0 30px 30px;
    }
    
    .dashboard-header-inner {
        padding: 25px 25px 0 25px;
    }
    
    .dashboard-logo a {
        font-size: 20px;
    }
    
    .dashboard-logo svg {
        width: 140px;
        height: auto;
    }
}

/* Small Mobile - 480px */
@media (max-width: 480px) {
    .dashboard-header {
        border-radius: 0 0 20px 20px;
    }
    
    .dashboard-header-background {
        border-radius: 0 0 20px 20px;
    }
    
    .dashboard-header-inner {
        padding: 20px 20px 0 20px;
        gap: 15px;
    }
    
    .dashboard-logo a {
        font-size: 18px;
    }
    
    .dashboard-logo svg {
        width: 120px;
        height: auto;
    }
    
    .dashboard-logout {
        padding: 8px 16px;
        font-size: 14px;
    }
}
