/* main.css - общие стили для всех страниц GluPayments */

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

body {
    background-color: #030705;
    color: #00ff9f;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* MATRIX BACKGROUND */
canvas#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.18;
    pointer-events: none;
}

/* основные эффекты */
.glass {
    background: rgba(0, 20, 10, 0.65);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(0, 255, 159, 0.15);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8);
}

.text-gradient {
    background: linear-gradient(135deg, #b0ffdb, #00ff9f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

hr {
    border: none;
    border-top: 1px solid rgba(0, 255, 159, 0.2);
    margin: 16px 0;
}

/* кнопки */
button, .btn-like {
    background: transparent;
    border: 1px solid rgba(0, 255, 159, 0.4);
    color: #00ffb3;
    padding: 8px 14px;
    border-radius: 30px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(2px);
}

button:hover {
    background: #00ff9f;
    color: #030705;
    border-color: #00ff9f;
    box-shadow: 0 0 12px #00ff9f;
}

button.active {
    background: #00ff9f;
    color: #030705;
    font-weight: 600;
    border-color: #00ff9f;
}

/* layout */
#root {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* HEADER */
.header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 20, 10, 0.5);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 255, 159, 0.2);
    border-radius: 60px;
    padding: 12px 24px;
    margin-bottom: 8px;
}

.logo a {
    font-size: 24px;
    font-weight: 600;
    color: #00ff9f;
    text-decoration: none;
    letter-spacing: 1px;
    text-shadow: 0 0 8px #00ff9f;
}

.online-switch {
    background: rgba(0,30,15,0.9);
    border: 1px solid #00ff9f;
    color: #00ff9f;
    padding: 6px 18px;
    border-radius: 40px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.online-switch[data-online="0"]::after {
    content: "";
    width: 10px;
    height: 10px;
    background: #00ff9f;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff9f;
}

.lang-select-btn {
    background: transparent;
    border: none;
    color: #00ff9f;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-balance {
    text-align: right;
    border-left: 2px solid #00ff9f;
    padding-left: 16px;
}

.header-balance p {
    font-size: 20px;
    font-weight: 600;
}

.header-balance span {
    font-size: 11px;
    opacity: 0.6;
}

.header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #00ff9f;
    background: #0f2a1f;
}

.header-email {
    max-width: 180px;
    font-size: 13px;
    opacity: 0.8;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* основной лэйаут */
.page-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* NAV */
nav.glass {
    flex: 0 0 260px;
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

nav ul {
    list-style: none;
    width: 100%;
}

nav li {
    width: 100%;
    margin-bottom: 6px;
}

nav li button {
    width: 100%;
    justify-content: flex-start;
    border: 1px solid transparent !important;
    border-radius: 12px;
    background: transparent;
    padding: 12px 16px;
    color: #ccc;
    font-size: 14px;
    transition: 0.15s;
    box-sizing: border-box !important;
    height: 48px !important;
    margin: 2px 0 !important;
}

nav li button:hover,
nav li.current button {
    background: rgba(0, 255, 159, 0.1);
    color: #00ff9f;
    border-color: #00ff9f !important;
    box-shadow: 0 0 12px rgba(0,255,159,0.3);
}

nav li.current button p {
    font-weight: 600;
    color: #00ff9f;
}

.route-group h3 {
    font-size: 11px;
    letter-spacing: 1.5px;
    opacity: 0.5;
    margin-bottom: 12px;
    padding-left: 16px;
}

.nav-bottom-actions {
    margin-top: auto;
    border-top: 1px solid rgba(0,255,159,0.2);
    padding-top: 16px;
}

/* основной контент */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* заголовки */
h2 {
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 2px solid #00ff9f;
    padding-bottom: 10px;
    margin-bottom: 16px;
    display: inline-block;
    text-shadow: 0 0 5px #00ff9f;
}

/* вспомогательные */
.text-small {
    font-size: 12px;
    opacity: 0.5;
}

select, input {
    background: #0b1f15;
    border: 1px solid #00ff9f;
    color: #00ff9f;
    padding: 10px;
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
}

/* мобильный тогл */
.mobile-menu-toggle {
    display: none;
}

/* иконки */
nav li button img {
    filter: brightness(0) saturate(100%) invert(78%) sepia(61%) saturate(2487%) hue-rotate(90deg) brightness(101%) contrast(101%);
    opacity: 0.9;
}

nav li.current button img {
    filter: brightness(0) saturate(100%) invert(78%) sepia(61%) saturate(2487%) hue-rotate(90deg) brightness(101%) contrast(101%);
}

/* ПОДМЕНЮ ПРОЦЕССИНГА */
.processing-submenu {
    list-style: none;
    margin-left: 28px;
    margin-top: 4px;
    border-left: 1px solid rgba(0, 255, 159, 0.2);
    padding-left: 12px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    max-height: 0;
    opacity: 0;
    width: calc(100% - 40px);
}

.processing-submenu.expanded {
    max-height: 100px;
    opacity: 1;
}

.processing-submenu li {
    margin-bottom: 2px;
    width: 100%;
}

.processing-submenu li button {
    padding: 8px 16px !important;
    height: 40px !important;
    font-size: 13px !important;
    width: 100% !important;
    text-align: left;
    border: 1px solid transparent !important;
    box-sizing: border-box !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.processing-submenu li button span {
    display: inline-block;
    min-width: 28px;
}

/* стрелочка */
.arrow-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.arrow-icon.rotated {
    transform: rotate(90deg);
}

/* мобильные стили */
@media (max-width: 768px) {
    .page-layout {
        flex-direction: column;
    }
    
    nav.glass {
        position: fixed;
        top: 0;
        left: -280px;
        width: 260px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        border-radius: 0 16px 16px 0;
        overflow-y: auto;
    }
    
    nav.mobile-nav-open {
        left: 0;
    }
    
    body.mobile-nav-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        backdrop-filter: blur(2px);
    }
    
    .header-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
}

.main-content {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.main-content > * {
    max-width: 100%;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 30px;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
}

.notification.success {
    background: #00ff9f;
    color: #030705;
}

.notification.error {
    background: #ff3b3b;
    color: #030705;
}

.notification.info {
    background: rgba(0, 255, 159, 0.2);
    color: #00ff9f;
    border: 1px solid #00ff9f;
}

/* ===== ОБЩИЕ СТИЛИ ДЛЯ МОДАЛЬНЫХ ОКОН ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    position: relative;
    width: 100%;
    max-width: 600px; /* Увеличил для формы реквизитов */
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(0, 255, 159, 0.3);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 255, 159, 0.1);
    border-color: #00ff9f;
}

.modal-close img {
    width: 20px;
    height: 20px;
}

/* Стилизованный скроллбар для модалок */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 255, 159, 0.05);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 159, 0.3);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 159, 0.5);
}

/* ===== ОБЩИЕ СТИЛИ ДЛЯ ВЫПАДАЮЩЕГО МЕНЮ ===== */
.dropdown-menu {
    position: absolute;
    background: rgba(0, 20, 10, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 159, 0.3);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 160px;
    z-index: 9999;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

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

.dropdown-menu button {
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: #00ff9f;
    text-align: left;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'JetBrains Mono', monospace;
}

.dropdown-menu button:hover {
    background: rgba(0, 255, 159, 0.1);
}

.dropdown-menu button.delete {
    color: #ff6b6b;
}

.dropdown-menu button.delete:hover {
    background: rgba(255, 59, 59, 0.1);
}

.dropdown-menu hr {
    margin: 4px 0;
    border: none;
    border-top: 1px solid rgba(0, 255, 159, 0.2);
}

.dropdown-menu svg {
    width: 16px;
    height: 16px;
}

.dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
}

/* Стили для ссылок в навигации */
nav li a {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent !important;
    border-radius: 12px;
    background: transparent;
    padding: 12px 16px;
    color: #ccc;
    font-size: 14px;
    transition: 0.15s;
    box-sizing: border-box !important;
    height: 48px !important;
    margin: 2px 0 !important;
    text-decoration: none;
}

nav li a:hover,
nav li.current a {
    background: rgba(0, 255, 159, 0.1);
    color: #00ff9f;
    border-color: #00ff9f !important;
    box-shadow: 0 0 12px rgba(0,255,159,0.3);
}

nav li.current a p,
nav li.current a {
    font-weight: 600;
    color: #00ff9f;
}

/* Стили для подменю */
.processing-submenu li a {
    padding: 8px 16px !important;
    height: 40px !important;
    font-size: 13px !important;
    width: 100% !important;
    text-align: left;
    border: 1px solid transparent !important;
    box-sizing: border-box !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ccc;
    text-decoration: none;
}

.processing-submenu li.current a {
    background: rgba(0, 255, 159, 0.1);
    color: #00ff9f;
    border-color: #00ff9f !important;
}