:root {
    /* Backgrounds */
    --color-bg-primary: #111827; /* Darkest gray, main background */
    --color-bg-secondary: #1F2937; /* Slightly lighter gray, for alternate sections/cards */
    --color-header-bg: #111827; /* Header background, will use opacity */
    --color-dropdown-bg: #111827; /* Dropdown background, matching primary bg */

    /* Text Colors */
    --color-text-light: #FFFFFF; /* Pure white for main text */
    --color-text-medium: #D1D5DB; /* Lighter gray for secondary text (text-gray-300) */
    --color-text-dark: #9CA3AF; /* Darker gray for muted text (text-gray-400) */

    /* Accent Colors (Blue/Purple tech theme) */
    --color-accent-blue-light: #60A5FA; /* From text-blue-400 */
    --color-accent-blue-medium: #3B82F6; /* From focus:ring-blue-500, profile border */
    --color-accent-blue-dark: #2563EB; /* From bg-blue-600 */
    --color-accent-purple: #8B5CF6; /* From to-purple-500 in gradient */

    /* Borders & Shadows */
    --color-border-subtle: #374151; /* From border-gray-700 for inputs */
    --color-border-accent: #3B82F6; /* For profile image border */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* Tailwind shadow-sm */
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); /* Tailwind shadow-md */
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* Tailwind shadow-lg */
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* Tailwind shadow-xl */
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* Tailwind shadow-2xl */

    /* General */
    --radius-sm: 0.25rem; /* rounded-sm */
    --radius-md: 0.375rem; /* rounded-md */
    --radius-lg: 0.5rem; /* rounded-lg */
    --radius-xl: 0.75rem; /* rounded-xl */
    --radius-full: 9999px; /* rounded-full */
    --transition-fast: all 0.15s ease-in-out;
    --transition-medium: all 0.3s ease-in-out;
}

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

body {
    font-family: 'Inter', sans-serif; /* Keep Inter as it's already used */
    background: var(--color-bg-primary); /* Use primary dark background */
    color: var(--color-text-light); /* Use light text color */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

body.loaded {
    opacity: 1;
    visibility: visible;
}

/* Header and Navigation */
.header {
    background: rgba(17, 24, 39, 0.9); /* bg-gray-900 with opacity 90 */
    backdrop-filter: blur(8px); /* Optional: add blur for modern feel */
    box-shadow: var(--shadow-md); /* Use shadow-md */
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 100vw; /* Ensure header does not exceed viewport width */
    z-index: 100000; /* Increased z-index to be on top of everything */
}

.nav-container {
    width: 100%; /* Change to 100% to ensure it takes full available width */
    margin: 0 auto;
    padding: 0 16px; /* Adjusted padding for better mobile responsiveness */
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    gap: 16px;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    /* Original gradient for brand name - apply via JS or inline style if text, or keep logo */
    color: var(--color-text-light) !important; /* Default for now, if not gradient */
    text-decoration: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%); /* Simpler centering for all screen sizes */
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-gradient-brand {
    background: linear-gradient(to right, #60A5FA, #8B5CF6); /* Blue to Purple */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.brand-logo {
    height: 40px;
    width: auto;
    display: block;
}

.menu-section {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: var(--color-text-medium) !important; /* text-gray-300 equivalent */
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    text-transform: uppercase; /* Match React example's uppercase */
    letter-spacing: 0.05em; /* tracking-wider */
}

.nav-link:hover {
    color: var(--color-accent-blue-light) !important; /* hover:text-blue-400 */
    background: transparent; /* No background on hover for nav links */
}
.nav-link.active, /* For active section highlighting */
.nav-link.current-page { /* If you use a class for current page */
    color: var(--color-accent-blue-light) !important; /* text-blue-400 */
    font-weight: 600; /* font-semibold */
}

.auth-buttons {
    display: flex;
    gap: 12px;
    flex-direction: row;
    width: auto;
}

/* Auth Buttons */
.auth-btn {
    padding: 10px 15px; /* Adjusted padding for smaller screens */
    border-radius: var(--radius-md); /* rounded-md */
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: unset; /* Remove min-width to allow shrinking */
    border: 2px solid var(--color-border-subtle); /* A subtle border */
    background-color: var(--color-bg-primary); /* Dark button background */
    color: var(--color-text-light) !important; /* Light text */
    text-align: center;
}

.auth-btn:hover {
    background-color: var(--color-bg-secondary); /* Slightly lighter background on hover */
    color: var(--color-text-light) !important;
}

.auth-btn-inverted { /* Primary style button from React example (blue background) */
    background: var(--color-accent-blue-dark) !important; /* bg-blue-600 */
    border-color: var(--color-accent-blue-dark) !important;
    color: var(--color-text-light) !important;
    font-weight: 500; /* Medium weight */
}

.auth-btn-inverted:hover {
    background: #1D56BF !important; /* Slightly darker blue on hover */
    border-color: #1D56BF !important;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: auto; /* Align with the right edge of the profile-btn by default */
    right: 0; /* Align with the right edge of the profile-btn by default */
    background: var(--color-dropdown-bg); /* Dark background */
    border: 1px solid var(--color-border-subtle); /* Subtle border */
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: unset; /* Remove min-width to allow shrinking */
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    z-index: 9999; /* Устанавливаем высокий z-index, чтобы он был под шапкой, но над контентом */
    padding: 0;
}

.dropdown-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* Ensure it animates correctly when active */
}

.settings-dropdown .dropdown-content {
    left: auto;
    right: 100%;
    top: 0;
    margin-right: 0;
    background: var(--color-dropdown-bg);
    transition: var(--transition-medium);
}

.profile-btn {
    display: flex;
    align-items: center;
    justify-content: center; /* Center the icon horizontally */
    gap: 0; /* No gap needed if only icon is present */
    padding: 8px; /* Adjusted padding to make it a square button */
    width: 48px; /* Set a fixed width for the circular button */
    height: 48px; /* Set a fixed height for the circular button */
    border-radius: var(--radius-full); /* Make it perfectly round */
    background: var(--color-bg-secondary); /* Slightly lighter background for profile button */
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
    color: var(--color-text-light); /* Light text */
}

.profile-btn:hover {
    background: #2D3A4B; /* Even darker on hover */
}

.user-details {
    display: none; /* Hide the user details div by default as it's now in dropdown */
}

.user-details-dropdown {
    text-align: left;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-light);
}

.user-email {
    font-size: 0.8rem;
    color: var(--color-text-dark); /* text-gray-400 */
}

.dropdown-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.2s;
    stroke: var(--color-text-light); /* Light icon color */
}

/* Hamburger Menu */
.header-hamburger {
    display: none; /* Это общий класс, он не должен отображаться по умолчанию */
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 1002; /* Низкий z-index, так как он скрыт по умолчанию */
    width: 48px;
    height: 48px;
    display: flex; /* Используем flex для центрирования содержимого */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative; /* Добавляем relative для абсолютного позиционирования span */
    transition: all 0.3s ease-in-out;
}

.header-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-light); /* Light lines */
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    position: absolute; /* Делаем линии абсолютно позиционированными */
    left: 50%; /* Центрируем по горизонтали */
    transform: translateX(-50%); /* Корректируем для точного центрирования */
}

.header-hamburger span:nth-child(1) {
    top: 15px; /* Верхняя линия */
}

.header-hamburger span:nth-child(2) {
    top: 23px; /* Средняя линия */
}

.header-hamburger span:nth-child(3) {
    top: 31px; /* Нижняя линия */
}

/* Hamburger Animation */
.header-hamburger.active span:nth-child(1) {
    top: 23px; /* Перемещаем верхнюю линию в центр */
    transform: translateX(-50%) rotate(45deg);
}
.header-hamburger.active span:nth-child(2) {
    opacity: 0;
}
.header-hamburger.active span:nth-child(3) {
    top: 23px; /* Перемещаем нижнюю линию в центр */
    transform: translateX(-50%) rotate(-45deg);
}

.dropdown-content .nav-link {
    color: var(--color-text-medium) !important;
    padding: 10px 16px;
}

.dropdown-content .nav-link:hover {
    background: var(--color-bg-secondary); /* Slightly lighter background on hover */
    color: var(--color-text-light) !important;
}

.logout-btn {
    text-align: left;
    background: none;
    border: none;
    width: 100%;
    padding: 10px 16px;
    color: var(--color-text-medium) !important;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.logout-btn:hover {
    background: var(--color-bg-secondary) !important;
    color: var(--color-text-light) !important;
}

/* Media Queries for Responsiveness (kept similar to original) */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
        height: 64px;
        justify-content: space-between;
    }

    .brand {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--color-text-light) !important;
        text-decoration: none;
        position: absolute;
        left: 50%;
        transform: translateX(-50%); /* Keep simple centering for mobile */
        order: 2;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .brand-logo {
        height: 32px;
    }

    .header-hamburger {
        display: flex !important; /* Гарантируем отображение на мобильных */
        order: 1;
    }

    /* Original .left-menu styles that need to be re-evaluated for mobile */
    .left-menu {
        display: none !important; /* Hide desktop main menu */
    }

    .right-menu {
        /* display: none !important; Удалено */
        order: 3;
        margin-left: auto; /* Добавлено, чтобы прижать вправо */
    }

    .profile-btn {
        background: none;
        padding: 8px;
        gap: 0;
        width: 48px;
        height: 48px;
        border-radius: var(--radius-full);
    }

    .user-details {
        display: none !important;
    }

    .user-name {
        font-size: 0.8rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .user-email {
        display: none;
    }

    .dropdown-icon {
        display: block !important;
        width: 24px;
        height: 24px;
    }

    .left-menu .auth-buttons {
        display: flex; /* Показываем на мобильных в открытом меню */
        flex-direction: column;
        gap: 12px;
        width: 100%;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--color-border-subtle);
    }

    .left-menu .auth-buttons .auth-btn {
        width: 100%;
        text-align: center;
        min-width: unset; /* Ensure it takes full width without min-width */
        padding: 12px 20px;
        font-size: 1rem;
        height: auto;
        border-width: 1px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .left-menu .nav-link {
        width: 100%;
        padding: 12px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .left-menu .nav-link:last-child {
        border-bottom: none;
    }

    .dropdown-content {
        right: 0;
        left: auto;
        top: calc(100% + 10px);
        transform: translateY(-10px);
        z-index: 9999;
        min-width: unset; /* Remove min-width to allow shrinking */
        display: none; /* Add this to ensure dropdown is hidden by default on mobile */
    }
    
    .dropdown-content.active {
        display: block; /* Show dropdown when active */
        transform: translateY(0);
    }

    .settings-dropdown .dropdown-content {
        left: 0 !important;
        right: auto !important;
        top: 100% !important;
        margin-top: 5px;
        display: none;
        position: relative;
        background: transparent;
        box-shadow: none;
    }

    .settings-dropdown.active .dropdown-content {
        display: block;
        padding-left: 15px;
    }

    .dashboard-toggle-btn {
        display: none !important; /* Убираем лишнюю иконку на мобильных */
    }

    .rates-section {
        display: none !important; /* Ensure rates section is hidden on mobile */
    }

    /* Corrected mobile-bottom-nav styles */
    .mobile-bottom-nav {
        display: none; /* Скрываем мобильную навигацию по умолчанию, управляем через JS */
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 72px; /* Increased height for better tap area */
        background-color: var(--color-bg-secondary); /* Цвет фона */
        box-shadow: 0 -4px 12px rgba(0,0,0,0.25); /* Stronger shadow */
        z-index: 10000;
        justify-content: space-around;
        align-items: center;
        padding: 0 10px;
        border-top: 1px solid var(--color-border-subtle);
        border-top-left-radius: 12px; /* Rounded top corners */
        border-top-right-radius: 12px; /* Rounded top corners */
        max-width: 100vw; /* Ensure mobile nav does not exceed viewport width */
    }

    .mobile-bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--color-text-dark); /* Цвет иконок и текста по умолчанию */
        font-size: 0.8rem; /* Slightly larger font */
        font-weight: 500;
        transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, border-radius 0.2s ease-in-out;
        flex: 1;
        height: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 8px 0; /* Add vertical padding */
        position: relative;
    }

    .mobile-bottom-nav-item i {
        font-size: 1.5rem; /* Larger icon size */
        margin-bottom: 6px; /* Adjusted margin */
        color: var(--color-text-dark); /* Default icon color */
        transition: color 0.2s ease-in-out;
    }

    .mobile-bottom-nav-item.active {
        color: var(--color-accent-blue-light); /* Active text color */
        background-color: rgba(59, 130, 246, 0.2); /* Subtle blue background for active item */
        border-radius: 12px; /* Rounded corners for active item */
        margin: 0 4px; /* Slight margin to give space between items */
    }

    .mobile-bottom-nav-item.active i {
        color: var(--color-accent-blue-light); /* Active icon color */
    }

    .mobile-bottom-nav-item:hover {
        color: var(--color-accent-blue-light);
    }

}

@media (max-width: 480px) {

    .profile-btn {
        width: 40px; /* Smaller button for very small screens */
        height: 40px; /* Smaller button for very small screens */
        padding: 6px; /* Adjusted padding */
    }

    .dropdown-icon {
        width: 20px; /* Smaller icon for very small screens */
        height: 20px; /* Smaller icon for very small screens */
    }

    .dropdown-content {
        min-width: 200px; /* Adjusted min-width for smaller screens */
    }
}

/* Footer Styles */
.site-footer {
    background-color: var(--color-bg-primary); /* Dark footer background */
    color: var(--color-text-dark); /* Muted text for footer */
    padding: 2rem 1rem; /* Increased padding slightly */
    text-align: center;
    font-size: 0.85rem; /* Slightly smaller font */
    width: 100%;
}

/* --- General Content Styles (Moved from header.php <style> block) --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 6rem 0; /* Standard section padding */
    border-bottom: 1px solid var(--color-border-subtle); /* Subtle separator */
}
.section:last-child {
    border-bottom: none;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif; /* Keep Montserrat for headings */
    overflow-wrap: break-word;
    word-break: break-word;
    color: var(--color-text-light); /* Light color for all headings */
}
h2 {
    text-align: center;
    font-size: 2.5rem; /* Slightly larger h2 */
    margin-bottom: 2.5rem; /* More space below h2 */
    font-weight: 700; /* Bold */
}
h3 {
    font-size: 1.5rem; /* Larger h3 */
    margin-bottom: 1rem;
    font-weight: 600; /* Semibold */
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0 4rem 0; /* More padding for hero */
    background-color: var(--color-bg-primary); /* Dark background */
}

.hero img {
    display: block;
    max-width: 40%;
    height: auto;
    margin: 0 auto 2rem auto;
    border-radius: var(--radius-full); /* Rounded full */
    border: 4px solid var(--color-accent-blue-medium); /* Blue border */
    box-shadow: var(--shadow-lg); /* Larger shadow */
}

.hero h1 {
    font-size: 3.5rem; /* Larger h1 */
    margin-bottom: 1rem;
    color: var(--color-text-light);
}
/* Specific style for hero title gradient - needs to be applied directly in header.php */

/* Gradient Text for Hero H1 */
.text-gradient-hero {
    background-image: linear-gradient(to right, var(--color-accent-blue-light), var(--color-accent-purple)); /* blue-400 to purple-500 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback for browsers that don't support text-fill-color */
}

/* Subtitle in Hero Section */
.hero .subtitle {
    font-size: 1.8rem; /* Larger subtitle */
    color: var(--color-text-medium); /* text-gray-300 */
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.1rem;
    color: var(--color-text-dark); /* text-gray-400 */
    max-width: 700px;
    margin: 0 auto 2rem auto;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem; /* Adjusted padding */
    background-color: var(--color-accent-blue-dark); /* bg-blue-600 */
    color: var(--color-text-light); /* text-white */
    border-radius: var(--radius-md); /* rounded-md */
    text-decoration: none;
    transition: var(--transition-fast);
    gap: 0.8rem;
    margin-top: 2rem;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm); /* Subtle shadow */
}

.cta-btn:hover {
    background-color: #1D56BF; /* Darker blue on hover */
    transform: translateY(-2px); /* Slight lift */
    box-shadow: var(--shadow-md); /* More pronounced shadow */
}

.cta-btn-primary {
    background-color: var(--color-accent-blue-dark);
    color: var(--color-text-light) !important;
    border-color: var(--color-accent-blue-dark); /* Match background */
}

.cta-btn-primary:hover {
    background-color: #1D56BF; /* Darker blue on hover */
    border-color: #1D56BF; /* Match darker blue */
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7); /* Darker overlay */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: var(--color-bg-secondary); /* Lighter dark background for modal */
    padding: 3rem;
    border-radius: var(--radius-lg); /* rounded-lg */
    box-shadow: var(--shadow-xl); /* Stronger shadow */
    text-align: center;
    max-width: 450px; /* Slightly wider */
    width: 90%;
    position: relative;
    color: var(--color-text-light); /* Light text */
    border: 1px solid var(--color-border-subtle); /* Subtle border */
}
.modal-content h3 {
    margin-top: 0;
    margin-bottom: 2rem;
    color: var(--color-text-light);
}
.modal-content a, .modal-content button {
    display: block;
    padding: 0.8rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.modal-content a.modal-btn-primary {
    background-color: var(--color-accent-blue-dark); /* Primary blue for main modal button */
    color: var(--color-text-light) !important;
    border-color: var(--color-accent-blue-dark); /* Blue border for consistency */
}
.modal-content a.modal-btn-primary:hover {
    background-color: #1D56BF !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.modal-content a.modal-btn-secondary {
    background-color: transparent !important; /* Transparent background */
    color: var(--color-accent-blue-light) !important; /* Light blue text */
    border-color: var(--color-accent-blue-light); /* Light blue border */
}
.modal-content a.modal-btn-secondary:hover {
    background-color: rgba(96, 165, 250, 0.1) !important; /* Subtle blue background on hover */
    border-color: var(--color-accent-blue-light); /* Keep blue border */
}

.close-modal-btn {
    position: absolute;
    top: 15px !important; /* Adjusted position */
    right: 15px !important;
    width: 35px !important;
    height: 35px !important;
    display: grid !important;
    place-items: center !important;
    font-size: 1.8rem !important; /* Slightly smaller */
    line-height: 1 !important;
    color: var(--color-text-dark) !important; /* Darker gray for close button */
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: var(--transition-fast);
    border-radius: var(--radius-full) !important; /* Make it round */
    z-index: 10 !important;
}
.close-modal-btn:hover {
    color: var(--color-accent-blue-light) !important; /* Blue on hover */
    background-color: rgba(96, 165, 250, 0.1) !important; /* Subtle background on hover */
}

/* Arbitrage Flow Section */
.arbitrage-flow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    align-items: stretch;
    margin: 3rem 0;
    position: relative;
}
.flow-step {
    padding: 2.5rem 2rem;
    background: var(--color-bg-secondary); /* Dark background for steps */
    border-radius: var(--radius-lg); /* rounded-lg */
    box-shadow: var(--shadow-lg); /* Larger shadow */
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: var(--transition-medium);
    border: 1px solid var(--color-border-subtle); /* Subtle border */
}
.flow-step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl); /* More pronounced shadow on hover */
}
.flow-step i {
    color: var(--color-accent-blue-light); /* Use accent blue for icons */
    font-size: 3.5em; /* Larger icon */
    margin-bottom: 1.5rem;
}
.flow-step h3 {
    font-size: 1.3rem; /* Slightly larger h3 */
    color: var(--color-text-light);
}
.flow-step p {
    font-size: 0.98rem; /* Slightly larger paragraph text */
    color: var(--color-text-medium); /* text-gray-300 */
    flex-grow: 1;
}
.flow-step::after {
    content: '→';
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.8rem; /* Larger arrow */
    color: var(--color-accent-blue-light); /* Blue arrow */
    opacity: 0.7; /* Slightly less opaque */
}
.arbitrage-flow .flow-step:last-child::after {
    content: none;
}

/* Process Grid Section (Bot Technology) */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}
.process-card {
    padding: 2.5rem 2rem;
    background: var(--color-bg-secondary); /* Dark background for cards */
    border-radius: var(--radius-lg); /* rounded-lg */
    box-shadow: var(--shadow-lg); /* Larger shadow */
    transition: var(--transition-medium);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border-subtle); /* Subtle border */
}
.process-card:hover {
    transform: translateY(-8px); /* Less aggressive lift */
    box-shadow: var(--shadow-xl); /* More pronounced shadow */
}
.process-card i {
    color: var(--color-accent-blue-light); /* Accent blue for icons */
    font-size: 2.5em; /* Larger icon */
    margin-bottom: 1.5rem;
}
.process-card h3 {
    font-size: 1.35rem; /* Slightly larger h3 */
    color: var(--color-text-light);
}
.process-card p {
    font-size: 1rem;
    color: var(--color-text-medium); /* text-gray-300 */
    flex-grow: 1;
}

/* Features List Section */
.features-list {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}
.features-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.8rem;
    font-size: 1.05rem; /* Slightly smaller font for list items */
    line-height: 1.7;
    color: var(--color-text-medium); /* text-gray-300 */
}
.features-list li i {
    color: var(--color-accent-blue-light); /* Accent blue for icons */
    font-size: 1.8rem; /* Larger icon */
    margin-right: 1.2rem;
    flex-shrink: 0;
    width: 30px;
    text-align: center;
    margin-top: 2px;
}
.features-list li strong {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: var(--color-text-light); /* Light text for strong */
}

/* FAQ Section */
.faq-details {
    background-color: var(--color-bg-secondary); /* Dark background for FAQ cards */
    border-radius: var(--radius-lg); /* rounded-lg */
    box-shadow: var(--shadow-lg); /* Larger shadow */
    margin-top: 2rem;
    overflow: hidden;
    border: 1px solid var(--color-border-subtle); /* Subtle border */
}

.faq-details:hover {
    box-shadow: var(--shadow-xl); /* More pronounced shadow on hover */
}

.faq-summary {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-size: 1.15rem;
    color: var(--color-text-light); /* Light text for summary */
    list-style: none;
    transition: background-color var(--transition-fast);
}

.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::marker { display: none; }

.faq-summary:hover {
    background-color: #2D3A4B; /* Slightly darker background on hover */
}

.faq-summary i {
    transition: transform 0.3s ease, color 0.3s ease;
    font-size: 1.4em; /* Slightly larger icon */
    color: var(--color-text-dark); /* Muted icon color */
}

.faq-details[open] .faq-summary i {
    transform: rotate(180deg);
    color: var(--color-accent-blue-light); /* Accent blue when open */
}

.faq-content {
    padding: 0 2rem 1.5rem 2rem;
    border-top: 1px solid var(--color-border-subtle); /* Subtle border */
    color: var(--color-text-medium); /* text-gray-300 */
}

.faq-content p {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}
.faq-content p:first-child { margin-top: 1.5rem; }
.faq-content p:last-child { margin-bottom: 0; }

/* Responsive adjustments */
@media (max-width: 992px) {
    .arbitrage-flow {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .process-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0 2.5rem 0;
    }
    .hero img {
        max-width: 60%;
        margin: 0 auto 1.5rem auto;
    }
    .hero .subtitle {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    .hero p {
        font-size: 1rem;
        margin: 0 auto 1.5rem auto;
    }
    .cta-btn {
        margin-top: 1.5rem;
    }

    h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    h3 {
        font-size: 1.25rem;
    }

    .arbitrage-flow {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .flow-step::after {
        content: '↓';
        right: 50%;
        bottom: -25px;
        top: auto;
        transform: translateX(50%);
        font-size: 2.2rem;
    }
    .arbitrage-flow .flow-step:not(:last-child)::after {
        display: block;
    }
    .features-list li i {
        margin-top: 4px;
    }
    .close-modal-btn {
        top: 10px !important;
        right: 10px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 2rem !important;
    }
}
@media (max-width: 480px) {
    .hero {
        padding: 3rem 0 1.5rem 0;
    }
    .hero img {
        max-width: 80%;
        margin: 0 auto 1rem auto;
    }
    .hero .subtitle {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    .hero p {
        font-size: 0.95rem;
        margin: 0 auto 1rem auto;
    }
    .cta-btn {
        margin-top: 1rem;
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
    }

    h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    h3 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .flow-step {
        padding: 2rem 1.5rem;
    }
    .process-card {
        padding: 2rem 1.5rem;
    }
    .modal-content {
        padding: 2rem;
    }
    .modal-content h3 {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    .close-modal-btn {
        top: 8px !important;
        right: 8px !important;
        width: 35px !important;
        height: 35px !important;
        font-size: 1.7rem !important;
    }
}

/* --- END General Content Styles --- */

/* --- Login/Signup Page Styles (Moved from login.php <style> block) --- */
.login-page-wrapper {
    font-family: 'Inter', sans-serif; /* Use Inter for consistency */
    background-color: var(--color-bg-primary); /* Dark primary background */
    min-height: 100vh; /* Ensure full viewport height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center content vertically */
    padding: 100px 20px; /* Adjusted padding to accommodate header */
    overflow-y: auto;
    color: var(--color-text-medium); /* Medium light text for general content */
    width: 100%;
}

.auth-wrapper {
    width: 100%;
    max-width: 500px; /* Увеличена максимальная ширина */
    flex-shrink: 0;
}

.auth-container {
    background: var(--color-bg-secondary); /* Slightly lighter dark for form background */
    padding: 30px;
    border-radius: var(--radius-lg); /* rounded-lg */
    box-shadow: var(--shadow-xl); /* More pronounced shadow */
    max-height: 95vh; /* Allow some scroll on very small screens */
    overflow-y: auto;
    border: 1px solid var(--color-border-subtle); /* Subtle border */
}

.auth-container h1 {
    color: var(--color-text-light); /* Light text for heading */
    font-size: 24px; /* Larger heading */
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700; /* Bold */
}

.auth-container form {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Increased gap */
}

.auth-container .input-container {
    position: relative;
    width: 100%;
}

.auth-container .input-icon-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.auth-container input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border-subtle); /* Subtle dark border */
    border-radius: var(--radius-md);
    font-size: 15px;
    background: var(--color-bg-primary); /* Dark background for input */
    color: var(--color-text-light); /* Light text for input */
    transition: var(--transition-fast);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.auth-container .input-icon-wrapper input {
    flex-grow: 1;
    padding-right: 40px;
}

.auth-container input:focus {
    outline: none;
    border-color: var(--color-accent-blue-medium); /* Accent blue on focus */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); /* Subtle blue shadow */
}

.auth-container input::placeholder {
    color: var(--color-text-dark); /* Muted placeholder */
    font-size: 14px;
}

.auth-container .login-button {
    background: var(--color-accent-blue-dark); /* Accent blue button */
    color: var(--color-text-light); /* Light text */
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500; /* Semibold */
    cursor: pointer;
    transition: var(--transition-fast);
    width: 100%;
    box-shadow: var(--shadow-sm); /* Subtle shadow */
}

.auth-container .login-button:hover {
    background: #1D56BF; /* Darker blue on hover */
    transform: translateY(-2px); /* Slight lift */
    box-shadow: var(--shadow-md); /* More pronounced shadow */
}

.auth-container .links-container {
    text-align: center;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-container .links-container a {
    color: var(--color-accent-blue-light) !important; /* Light accent blue for links */
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.auth-container .links-container a:hover {
    text-decoration: underline;
    color: var(--color-accent-blue-medium) !important; /* Darker blue on hover */
}

.auth-container .input-icon-wrapper .eye-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 22px; /* Slightly larger icon */
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.auth-container .eye-icon svg {
    fill: none;
    stroke: var(--color-text-dark); /* Muted color for icon */
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

.auth-container .error {
    border-color: #EF4444 !important; /* Tailwind red-500 */
}

.auth-container .error-message {
    color: #EF4444; /* Tailwind red-500 */
    font-size: 12px;
    margin: 4px 0 0 4px;
    display: none;
}

@media (max-width: 480px) {
    .login-page-wrapper {
        padding: 80px 15px; /* Adjusted padding for smaller mobile */
        justify-content: flex-start;
    }

    .auth-wrapper {
        flex-shrink: 1;
        /* max-width: 95%; -- Удалено для сохранения ширины 500px на мобильных */
    }

    .auth-container {
        padding: 25px 20px;
        border-radius: var(--radius-md);
        max-height: none;
        overflow-y: visible;
    }

    .auth-container h1 {
        font-size: 22px;
        margin-bottom: 25px;
    }

    .auth-container input {
        padding: 11px 14px;
        font-size: 14px;
    }

    .auth-container .input-icon-wrapper input {
        padding-right: 38px;
    }

    .auth-container .login-button {
        padding: 12px;
        font-size: 14px;
    }

    .auth-container .input-icon-wrapper .eye-icon {
        right: 10px;
        width: 20px;
        height: 20px;
    }
}
/* --- END Login/Signup Page Styles --- */

/* --- CSS for hiding Tilda elements --- */
.t-tildafixes,
div[data-hook="tilda-footer"],
.t-records .t-records_animated .t-tildafixes {
    display: none !important;
}
/* --- End CSS for Tilda elements --- */

/* --- Profile Page Styles (Moved from profile.php <style> block) --- */
/* Consolidated .profile-page styles */
.profile-page {
    padding-top: 2.5rem; /* Adjusted padding from header */
    padding-bottom: 2.5rem; /* Adjusted padding from footer */
    max-width: 100vw;
    width: 100%;
    margin: 0;
}
.profile-inner {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    gap: 2rem; /* Added gap between sidebar and main content */
    padding: 0 1.5rem; /* Added horizontal padding for the inner container */
}

.profile-section {
    background-color: transparent; /* Устанавливаем прозрачный фон */
    box-shadow: none; /* Убираем тень */
    border: none; /* Убираем границу */
    padding: 30px;
    border-radius: var(--radius-lg);
    color: var(--color-text-light);
    width: 100%;
    max-width: 800px; /* Adjusted max-width */
    margin: 0 auto;
    animation: fadeIn 0.8s ease-out;
}

.profile-section h2 {
    color: var(--color-text-light); /* Light text for heading */
    margin-bottom: 25px;
    font-size: 2em;
    font-weight: 700;
}

.profile-info {
    text-align: left;
    margin-bottom: 30px;
}

.profile-info p {
    font-size: 1.1em;
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--color-text-medium); /* Medium text */
}

.profile-info strong {
    color: var(--color-text-light); /* Light text for strong */
    margin-right: 10px;
}

/* The logout-btn already has styles defined in header.css, no need to duplicate .btn styles */

@media (max-width: 768px) {
    .profile-page {
        padding: 0; /* Remove padding for profile page on smaller screens */
        min-height: calc(100vh - 64px - 80px); /* Adjust for mobile header */
        gap: 1.5rem; /* Adjust gap for mobile */
    }

    .profile-section {
        padding: 25px 20px;
    }

    .profile-section h2 {
        font-size: 1.8em;
    }

    .profile-info p {
        font-size: 1em;
    }
}

/* --- PROFILE DASHBOARD STYLES --- */
/* The following duplicate .profile-page definition is being removed */
/*
.profile-page {
    padding: 2rem;
    max-width: 1400px; /* Увеличил максимальную ширину для более просторной панели */
/*
    margin: 2rem auto;
    background-color: var(--color-bg-secondary); /* Использовать вторичный фон */
/*
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex; /* Flexbox для выравнивания содержимого на странице профиля */
/*
}
*/

.sidebar-container {
    position: fixed !important;
    top: 72px !important;
    left: 0 !important;
    height: calc(100vh - 72px) !important;
    z-index: 1000;
    width: 280px; /* Fixed width for the sidebar */
    background-color: var(--color-bg-secondary); /* Changed to secondary background */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex-shrink: 0; /* Prevent sidebar from shrinking */
    transition: transform 0.3s ease-in-out;
    border: 1px solid var(--color-border-subtle); /* Added border */
}

/* Стили для скрытого состояния меню на десктопе */
body.sidebar-hidden .sidebar-container {
    transform: translateX(-280px); /* Скрываем сайдбар, сдвигая его влево */
}

.sidebar-nav {
    flex-grow: 1;
    padding: 1rem;
}

.sidebar-nav a {
    text-decoration: none;
}

.sidebar-nav button {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: transparent; /* Прозрачный фон по умолчанию */
    color: var(--color-text-medium); /* Цвет текста */
    border: none;
    border-radius: var(--radius-md); /* Закругленные углы */
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 1rem;
    display: flex;
    align-items: center;
    outline: none;
    margin-bottom: 0.5rem;
}

.sidebar-nav button:focus {
    outline: 2px solid var(--color-accent-blue-light); /* Используем акцентный цвет */
    outline-offset: 2px;
}

.sidebar-nav button i {
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
    color: var(--color-text-dark); /* Цвет иконки */
    transition: var(--transition-fast);
}

.sidebar-nav button:hover {
    background-color: var(--color-bg-secondary); /* Фон при наведении */
    color: var(--color-text-light); /* Цвет текста при наведении */
}

.sidebar-nav button:hover i {
    color: var(--color-text-light); /* Цвет иконки при наведении */
}

/* Стили для активной кнопки */
.sidebar-nav button.active {
    background-color: var(--color-accent-blue-dark); /* Акцентный цвет для активной кнопки */
    color: var(--color-text-light); /* Белый текст */
    font-weight: 600;
}

.sidebar-nav button.active i {
    color: var(--color-text-light); /* Белая иконка */
}

/* Стили для блока с курсами */
.rates-section {
    padding: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--color-border-subtle);
    text-align: left;
    font-size: 0.9rem;
    color: var(--color-text-medium);
}

.rates-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-light);
}

.rate-item {
    margin-bottom: 0.3rem;
}

.rate-item strong {
    color: var(--color-accent-blue-light); /* Цвет для названий валют/криптовалют */
}

.rates-section .refresh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    margin-top: 1rem;
    background-color: var(--color-accent-blue-dark); /* Акцентный цвет */
    color: var(--color-text-light);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition-fast);
    font-weight: 500;
}

.rates-section .refresh-button:hover {
    background-color: #1D56BF; /* Более темный синий */
}

.rates-section .refresh-button:disabled {
    background-color: var(--color-border-subtle);
    cursor: not-allowed;
    opacity: 0.7;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--color-border-subtle);
    margin-top: auto; /* Прижимает футер к низу сайдбара */
}

.logout-btn {
    width: 100%;
    background-color: var(--color-bg-secondary); /* Фон кнопки выхода */
    border: none;
    color: var(--color-text-light);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    background-color: #2D3A4B; /* Чуть темнее при наведении */
    color: var(--color-accent-blue-light);
}

.logout-btn i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    color: var(--color-text-dark);
}

.logout-btn:hover i {
    color: var(--color-accent-blue-light);
}

/* Стили для кнопки переключения меню */
/* Удалены, так как кнопка "Панель управления" была удалена */

/* Стили для пользовательского тултипа, следующего за курсором */
/* Удалены, так как тултип был связан с кнопкой переключения */

/* Основное содержимое */
.main-content {
    flex-grow: 1; /* Allows main content to take up remaining space */
    background-color: transparent; /* Устанавливаем прозрачный фон */
    border-radius: var(--radius-lg);
    box-shadow: none; /* Убираем тень */
    border: none; /* Убираем границу */
    padding-top: 72px; /* Добавлен отступ для хедера на десктопе */
}

/* Корректируем margin-left для main-content, когда меню скрыто на десктопе */
.main-content {
    padding-left: 1.5rem; /* Стандартный отступ */
    transition: margin-left 0.3s ease-in-out;
}

body.sidebar-hidden .main-content {
    margin-left: -280px; /* Перемещаем контент влево, когда сайдбар скрыт */
}

.dashboard-section {
    animation: fadeIn 0.5s ease-out forwards;
    width: 100%; /* Ensure dashboard section takes full width */
    padding: 1.5rem; /* Added consistent padding for all dashboard sections */
    background-color: transparent; /* Устанавливаем прозрачный фон */
    box-shadow: none; /* Убираем тень */
    border: none; /* Убираем границу */
}

.dashboard-section h2 {
    font-size: 1.8rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border-subtle);
}

.dashboard-section p {
    color: var(--color-text-medium);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .profile-page {
        flex-direction: column; /* Stack sidebar and main content vertically */
        align-items: center; /* Center items when stacked */
        padding: 1.5rem; /* Adjust padding for smaller screens */
    }
    .profile-inner {
        padding: 0; /* Remove horizontal padding for .profile-inner */
    }
    .profile-section {
        max-width: none; /* Remove max-width restriction for profile sections on mobile */
    }
    .sidebar-container {
        position: fixed !important;
        top: 72px !important;
        left: 0 !important;
        height: calc(100vh - 72px) !important;
        max-width: 280px; /* Устанавливаем максимальную ширину для планшетов */
        z-index: 1000;
        box-shadow: var(--shadow-xl);
        border-radius: var(--radius-lg);
        padding: 2rem 1.5rem;
    }
    body.sidebar-hidden .sidebar-container {
        transform: translateX(-280px);
    }

    /* Удалены стили .sidebar-toggle */

    /* Удалены стили .sidebar-toggle i и .sidebar-toggle span */

    .main-content {
        width: 100%; /* Full width for main content on smaller screens */
        max-width: 100%;
        max-height: none; /* Allow natural height expansion on smaller screens */
        overflow-y: visible; /* Allow content to overflow without scrollbars */
        margin-left: 280px; /* Ensure no left margin from JS */
        margin-top: 1.5rem; /* Added margin to separate from sidebar on mobile */
        padding-top: 72px; /* Добавлен отступ для хедера на планшете */
    }
    body.sidebar-hidden .main-content {
        margin-left: 0 !important;
    }

    .custom-tooltip {
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    .profile-page {
        padding: 0; /* Remove padding for profile page on smaller screens */
        min-height: calc(100vh - 64px - 80px); /* Adjust for mobile header */
        gap: 1.5rem; /* Adjust gap for mobile */
    }
    .profile-inner {
        padding: 0; /* Ensure no padding for profile-inner on smaller screens */
    }

    .profile-section {
        padding: 25px 20px;
        max-width: none; /* Ensure no max-width here either */
    }
    .sidebar-container {
        display: none !important; /* Fully hide desktop sidebar on mobile */
    }
    /* Removed .sidebar-toggle and body.sidebar-hidden .sidebar-toggle styles as they are no longer relevant */

    .sidebar-menu {
        flex-direction: column;
        align-items: stretch;
    }
    .sidebar-item {
        text-align: left;
    }
    .sidebar-item i {
        margin-right: 1rem;
    }
    .main-content {
        padding: 1rem;
        padding-top: 64px; /* Добавлен отступ для хедера на мобильных */
        padding-bottom: 72px; /* Добавлен отступ для нижней навигации */
    }
    .dashboard-section h2 {
        font-size: 1.5rem;
    }
    .dashboard-toggle-btn {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .profile-page {
        padding: 0; /* Remove padding for very small screens */
        margin: 0; /* Remove margin for very small screens */
        gap: 1rem; /* Отступ между сайдбаром и контентом на очень маленьких экранах */
    }
    .profile-inner {
        padding: 0; /* Remove padding for very small screens */
    }
    .sidebar-container {
        position: fixed !important;
        top: 64px !important;
        left: 0 !important;
        height: calc(100vh - 64px) !important;
        width: 100vw !important;
        max-width: 100vw !important;
        z-index: 1000;
        border-radius: 0;
        padding: 1rem 0.2rem;
    }
    /* Удалены стили .sidebar-toggle */
    /* Удалены стили body.sidebar-hidden .sidebar-toggle */

    .sidebar-menu {
        flex-direction: column;
        align-items: stretch;
    }
    .sidebar-item {
        text-align: left;
    }
    .sidebar-item i {
        margin-right: 1rem;
    }
    .main-content {
        padding: 0.8rem;
        padding-top: 64px; /* Добавлен отступ для хедера на очень маленьких экранах */
        padding-bottom: 72px; /* Добавлен отступ для нижней навигации */
    }
    .dashboard-section h2 {
        font-size: 1.3rem;
    }
}

/* --- END Profile Page Styles --- */
html, body {
    height: 100%;
    box-sizing: border-box; /* Добавлено */
}
*, *::before, *::after { /* Добавлено для глобального применения */
    box-sizing: inherit;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* padding-top: 72px;  Удалено */
}
.site-footer {
    margin-top: auto;
}

.header-hamburger {
    display: none !important;
}

@media (max-width: 768px) {
    .header-hamburger {
        display: flex !important;
    }
    .left-menu {
        display: none !important;
        position: fixed;
        top: 64px;
        left: 0;
        width: 80vw;
        max-width: 320px;
        height: calc(100vh - 64px);
        background: var(--color-bg-primary);
        z-index: 10001;
        flex-direction: column;
        gap: 0;
        box-shadow: 2px 0 8px rgba(0,0,0,0.2);
        border-radius: 0 0 0.5rem 0.5rem;
        padding: 2rem 1rem 1.5rem 1rem;
        transition: transform 0.3s, opacity 0.3s;
        opacity: 0;
        pointer-events: none;
    }
    .left-menu.open {
        display: flex !important;
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
    }
    .nav-container {
        flex-wrap: nowrap;
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }
    .brand {
        left: 50%;
        transform: translateX(-50%);
        position: absolute;
        order: 2;
    }
    .right-menu {
        order: 3;
        margin-left: auto;
    }
}

@media (min-width: 769px) {
    .header-hamburger {
        display: none !important; /* Скрываем гамбургер на десктопе */
    }
    .left-menu {
        display: flex !important; /* Показываем меню на десктопе */
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 24px;
        background: none;
        box-shadow: none;
        height: auto;
        width: auto;
        max-width: none;
        padding: 0;
        opacity: 1;
        pointer-events: auto;
    }
    .nav-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }
    .brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        order: 2;
    }
    .right-menu {
        order: 3;
        margin-left: auto;
    }

    /* Убедимся, что dashboard-toggle-btn скрыт на десктопе, если он не нужен */
    .dashboard-toggle-btn {
        display: none !important;
    }
}

@media (max-width: 768px) {
  body .site-footer {
    display: none !important;
  }
  .main-content {
    padding-bottom: 72px !important; /* Корректируем padding-bottom для нижней панели */
  }
}
