/* ===============================================================
   TRAFFORD AGENCY - ПРАВИЛЬНАЯ ФИНАЛЬНАЯ ВЕРСИЯ
   
   Исправлено:
   ✅ Главная: карточки остаются в ряд, просто уменьшаются
   ✅ Кнопки ЦИАНОВЫЕ везде
   ✅ Модалка пополнения с правильными кнопками
   ✅ Страница заказов правильно адаптируется
   ✅ Header идеально центрирован
=============================================================== */

/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #eaeaea;
    background: url("/assets/images/bg-trafford.jpg") center center / cover no-repeat fixed;
    min-height: 100vh;
    animation: bgDrift 90s ease-in-out infinite alternate;
}

@keyframes bgDrift {
    0% { background-position: center top; }
    100% { background-position: center bottom; }
}

/* ================= HEADER / TOPBAR ================= */
.topbar {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 0;
    background: rgba(5, 18, 28, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 255, 200, 0.15);
    min-height: 120px;
}

.topbar::before,
.topbar::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 600px;
    height: 220px;
    filter: blur(40px);
    pointer-events: none;
}

.topbar::before {
    left: -200px;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.08) 0%, transparent 70%);
}

.topbar::after {
    right: -200px;
    background: radial-gradient(circle, rgba(0, 220, 255, 0.08) 0%, transparent 70%);
}

.heartbeat-line {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 55px;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

.heartbeat-line svg {
    width: 100%;
    height: 100%;
}

.base-path {
    fill: none;
    stroke: rgba(0, 220, 255, 0.18);
    stroke-width: 2.5;
    stroke-linecap: round;
}

.energy-path {
    fill: none;
    stroke: #19f0ff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 220 2200;
    animation: runEnergy 4.5s linear infinite;
    filter: drop-shadow(0 0 6px #19f0ff) drop-shadow(0 0 16px rgba(0, 240, 255, 0.6));
}

@keyframes runEnergy {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -2400; }
}

.topbar-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #19f0ff, #0aa8ff, #19f0ff, transparent);
}

.topbar-inner {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.topbar a {
    display: inline-block;
    text-decoration: none;
    position: relative;
    z-index: 15;
}

.banner-image {
    height: 80px;
    width: auto;
    display: block;
    cursor: pointer;
    opacity: 0.92;
    transition: all 0.3s ease;
    filter: brightness(0.78) contrast(1.08) saturate(0.90) drop-shadow(0 0 14px rgba(0, 220, 255, 0.25));
}

.topbar a:hover .banner-image {
    opacity: 1;
    filter: brightness(0.95) contrast(1.1) saturate(1) drop-shadow(0 0 20px rgba(0, 220, 255, 0.5));
}

/* ================= LAYOUT ================= */
.layout {
    display: grid;
    grid-template-columns: 260px 1fr 320px;
    gap: 40px;
    padding: 40px 60px;
    position: relative;
    z-index: 1;
}

.content {
    position: relative;
    z-index: 2;
    min-width: 0; /* Важно для правильного overflow */
    overflow-x: hidden;
}

/* ================= SIDEBAR ================= */
.sidebar {
    background: rgba(18, 22, 30, 0.55);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 18px;
    padding: 30px 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
}

.sidebar-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #6f7789;
    margin-bottom: 22px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #aab2c5;
    font-size: 14px;
    margin-bottom: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.sidebar-icon {
    font-size: 15px;
    opacity: 0.8;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

.sidebar-item.active {
    background: linear-gradient(135deg, #00ffd5, #00b3ff);
    color: #001018;
    box-shadow: 0 6px 20px rgba(0, 255, 213, 0.35);
}

.sidebar-divider {
    margin: 28px 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 200, 0.35), transparent);
    opacity: 0.7;
}

.sidebar-bottom {
    margin-top: 10px;
}

/* ================= PROFILE PANEL ================= */
.profile-panel {
    background: rgba(20, 24, 34, 0.75);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    position: relative;
}

.profile-top-glow {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 80px;
    background: radial-gradient(circle, rgba(0, 255, 200, 0.15), transparent 70%);
    pointer-events: none;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 25px;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ffd5, #00a8ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    color: white;
}

.profile-name {
    font-weight: 600;
    font-size: 15px;
}

.profile-role {
    font-size: 12px;
    color: #777f92;
}

.profile-balance-card {
    background: rgba(0, 255, 200, 0.05);
    border: 1px solid rgba(0, 255, 200, 0.15);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
}

.balance-label {
    font-size: 12px;
    color: #777f92;
    margin-bottom: 6px;
}

.balance-value {
    font-size: 22px;
    font-weight: 600;
    color: #00ffd5;
}

.profile-buttons {
    margin-bottom: 25px;
}

.profile-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #6f7789;
    margin-bottom: 15px;
}

.profile-links {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.profile-link {
    display: block;
    color: #888fa0;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 0;
    transition: color 0.3s;
}

.profile-link:hover {
    color: white;
}

/* ================= BUTTONS (ВСЕ ЦИАНОВЫЕ!) ================= */

/* PRIMARY - ЦИАНОВЫЙ */
.btn-primary {
    background: linear-gradient(135deg, #00ffd5, #00e0ff);
    border: none;
    color: #001a24;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: none;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 255, 213, 0.6);
    transform: translateY(-2px);
}

/* SECONDARY - ЦИАНОВЫЙ OUTLINE */
.btn-secondary {
    background: rgba(0, 255, 200, 0.08);
    border: 1px solid rgba(0, 255, 200, 0.25);
    color: #00ffd5;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(0, 255, 200, 0.15);
    border-color: rgba(0, 255, 200, 0.45);
    box-shadow: 0 0 20px rgba(0, 255, 200, 0.25);
}

/* КНОПКА ПОПОЛНИТЬ - ЦИАНОВАЯ */
.btn-gold {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #00ffd5, #00a8ff);
    border: none;
    color: #001018;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-gold:hover {
    box-shadow: 0 0 25px rgba(0, 255, 213, 0.5);
    transform: translateY(-2px);
}

/* OVERRIDE для кнопки #openDeposit - ЦИАНОВАЯ */
#openDeposit {
    background: linear-gradient(135deg, #00ffd5, #00e0ff) !important;
    color: #001018 !important;
}

#openDeposit:hover {
    box-shadow: 0 0 30px rgba(0, 255, 213, 0.6) !important;
}

/* DARK */
.btn-dark {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ccc;
    margin-bottom: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-dark:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* DANGER */
.btn-danger {
    border: 1px solid rgba(255, 80, 80, 0.35);
    background: rgba(255, 80, 80, 0.12);
    color: #ff6b6b;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: rgba(255, 80, 80, 0.18);
    box-shadow: 0 0 18px rgba(255, 80, 80, 0.20);
    transform: translateY(-2px);
}

/* ================= GLASS CARD ================= */
.glass-card {
    position: relative;
    background: rgba(20, 25, 35, 0.65);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 24px;
    padding: 50px;
    border: 1px solid rgba(0, 255, 200, 0.12);
    box-shadow: 
        0 30px 90px rgba(0, 0, 0, 0.9),
        0 0 30px rgba(0, 255, 200, 0.06);
    z-index: 3;
}

.glass-card::before,
.glass-card::after {
    pointer-events: none;
}

.glass-card a,
.glass-card button {
    position: relative;
    z-index: 5;
}

/* ================= HOME PAGE ================= */
.agency-home {
    margin-top: -10px;
}

.agency-glow {
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 255, 200, 0.10), transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.agency-intro {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 60px;
    position: relative;
    z-index: 2;
}

.agency-intro p {
    font-size: 17px;
    opacity: 0.85;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
}

.agency-intro::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -25px;
    transform: translateX(-50%);
    width: 160px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 200, 0.6), transparent);
}

/* ================= SERVICE CARDS (ПЛАВНО УМЕНЬШАЮТСЯ С ЭКРАНОМ) ================= */
.agency-services {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 35px;
    align-items: center;
    width: 100%;
}

.agency-row {
    display: flex;
    gap: 2%;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
}

.agency-row-bottom {
    max-width: 90%;
}

.agency-card {
    width: 22%;
    max-width: 220px;
    min-width: 140px;
    text-align: center;
    padding: 22px;
    border-radius: 18px;
    background: rgba(15, 25, 40, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(0, 255, 200, 0.15);
    text-decoration: none;
    transition: all 0.35s ease;
}

.agency-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    margin-bottom: 16px;
    transition: transform 0.3s;
}

.agency-card span {
    display: block;
    font-size: clamp(13px, 1.2vw, 16px);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.agency-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 0 35px rgba(0, 255, 200, 0.25),
        0 20px 60px rgba(0, 0, 0, 0.6);
    border-color: rgba(0, 255, 200, 0.35);
}

.agency-card:hover img {
    transform: scale(1.05);
}

/* ================= MODALS ================= */
.custom-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.custom-modal-content {
    width: 480px;
    max-width: 92%;
    background: rgba(20, 25, 35, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(0, 255, 200, 0.25);
    box-shadow: 0 0 60px rgba(0, 255, 200, 0.15);
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    font-size: 28px;
    cursor: pointer;
    opacity: 0.6;
    line-height: 1;
    transition: opacity 0.3s;
}

.modal-close:hover {
    opacity: 1;
    color: #00ffd5;
}

.modal-submit {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00ffd5, #00b3ff);
    border: none;
    color: #001018;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-submit:hover {
    box-shadow: 0 0 30px rgba(0, 255, 213, 0.5);
    transform: translateY(-2px);
}

/* QUICK AMOUNTS - ЦИАНОВЫЕ КНОПКИ */
.quick-amounts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.quick-amounts button {
    padding: 10px;
    border-radius: 10px;
    background: rgba(0, 255, 200, 0.08);
    border: 1px solid rgba(0, 255, 200, 0.25);
    color: #00ffd5;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-amounts button:hover,
.quick-amounts button.active {
    background: rgba(0, 255, 200, 0.2);
    border-color: rgba(0, 255, 200, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 200, 0.3);
}

/* INPUT В МОДАЛКЕ */
.custom-modal input[type="number"] {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 200, 0.25);
    background: rgba(20, 30, 45, 0.8);
    color: white;
    font-size: 14px;
    transition: all 0.3s;
}

.custom-modal input[type="number"]::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.custom-modal input[type="number"]:focus {
    outline: none;
    border-color: #00ffd5;
    box-shadow: 0 0 20px rgba(0, 255, 213, 0.3);
}

/* ================= AUTH MODALS ================= */
.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.auth-modal.active {
    display: flex;
}

.auth-box {
    width: 420px;
    max-width: 92%;
    background: rgba(15, 20, 30, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 22px;
    padding: 40px 35px;
    border: 1px solid rgba(0, 255, 200, 0.20);
    box-shadow: 0 0 50px rgba(0, 255, 200, 0.20);
    position: relative;
}

.auth-close {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 26px;
    cursor: pointer;
    opacity: 0.6;
    line-height: 1;
}

.auth-close:hover {
    opacity: 1;
    color: #00ffd5;
}

.auth-box h3 {
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
}

.auth-box form input {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 200, 0.25);
    background: rgba(20, 30, 45, 0.8);
    color: white;
    font-size: 14px;
    transition: all 0.3s;
}

.auth-box form input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.auth-box form input:focus {
    outline: none;
    border-color: #00ffd5;
    box-shadow: 0 0 20px rgba(0, 255, 213, 0.3);
}

.auth-error {
    padding: 12px;
    background: rgba(255, 80, 80, 0.15);
    border: 1px solid rgba(255, 80, 80, 0.35);
    border-radius: 10px;
    color: #ff6b6b;
    margin-bottom: 18px;
    font-size: 13px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.auth-switch span {
    color: #00ffd5;
    cursor: pointer;
    text-decoration: underline;
}

.auth-switch span:hover {
    color: #00b3ff;
}

/* ================= SEO ACCORDION ================= */
.seo-details {
    margin-top: 24px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(10, 18, 28, 0.35);
    border: 1px solid rgba(0, 200, 255, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.seo-details summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    user-select: none;
}

.seo-details summary::-webkit-details-marker {
    display: none;
}

.seo-details summary::after {
    content: "Показать";
    float: right;
    font-weight: 600;
    opacity: 0.85;
}

.seo-details[open] summary::after {
    content: "Скрыть";
}

.seo-text {
    margin-top: 14px;
    line-height: 1.55;
    opacity: 0.95;
}

.seo-text h2 {
    font-size: 20px;
    margin: 10px 0;
}

.seo-text h3 {
    margin: 14px 0 6px;
    color: #19f0ff;
    font-size: 16px;
}

.seo-lead {
    font-size: 16px;
    margin: 15px 0;
    opacity: 0.9;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.seo-card {
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 200, 0.1);
}

.seo-card p {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 8px;
}

/* ================= TOAST ================= */
.toast {
    position: fixed;
    top: 100px;
    right: 30px;
    padding: 16px 24px;
    background: rgba(0, 255, 163, 0.15);
    border: 1px solid rgba(0, 255, 163, 0.35);
    border-radius: 12px;
    color: #00ffa3;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0, 255, 163, 0.25);
    z-index: 10000;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ================= TRANSACTIONS ================= */
.transactions-list {
    max-height: 400px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.transaction-item .status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(0, 255, 170, 0.15);
    color: #00ffaa;
}

/* ================= RESPONSIVE (ПЛАВНАЯ АДАПТАЦИЯ) ================= */

/* 1920px+ - Большие десктопы */
@media (min-width: 1920px) {
    .layout {
        max-width: 1800px;
        margin: 0 auto;
    }
}

/* 1600px - Средние ноутбуки */
@media (max-width: 1600px) {
    .layout {
        grid-template-columns: 240px 1fr 280px;
        gap: 30px;
        padding: 35px 40px;
    }

    .glass-card {
        padding: 40px 30px;
    }
}

/* 1440px - Стандартные ноутбуки (MacBook Pro 14") */
@media (max-width: 1440px) {
    .layout {
        grid-template-columns: 220px 1fr 260px;
        gap: 25px;
        padding: 30px 35px;
    }

    .glass-card {
        padding: 35px 28px;
    }

    .agency-card {
        padding: 18px;
    }
}

/* 1366px - Малые ноутбуки (большинство Windows) */
@media (max-width: 1366px) {
    .layout {
        grid-template-columns: 200px 1fr 240px;
        gap: 20px;
        padding: 25px 25px;
    }

    .glass-card {
        padding: 30px 22px;
    }

    .agency-card {
        padding: 16px;
        min-width: 120px;
    }

    .profile-panel {
        padding: 25px 18px;
    }
}

/* 1280px - Очень малые ноутбуки */
@media (max-width: 1280px) {
    .layout {
        grid-template-columns: 180px 1fr 220px;
        gap: 18px;
        padding: 20px 20px;
    }

    .sidebar {
        padding: 25px 15px;
    }

    .profile-panel {
        padding: 22px 16px;
    }

    .profile-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .balance-value {
        font-size: 20px;
    }
}

/* 1200px - Переход к скрытию sidebar/profile */
@media (max-width: 1200px) {
    .layout {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 20px;
    }

    .sidebar,
    .profile-panel {
        display: none;
    }

    .glass-card {
        padding: 30px 25px;
    }

    .agency-card {
        width: 20%;
        min-width: 150px;
    }
}

/* 900px - Большие планшеты */
@media (max-width: 900px) {
    .layout {
        padding: 25px 18px;
    }

    .glass-card {
        padding: 25px 20px;
    }

    .agency-services {
        gap: 25px;
    }

    .agency-row {
        gap: 12px;
    }

    .agency-card {
        width: 135px;
        padding: 12px;
    }

    .agency-card img {
        height: 100px;
    }

    .topbar {
        padding: 15px 0;
    }

    .banner-image {
        height: 60px;
    }
}

/* 768px - Средние планшеты (ТЕПЕРЬ ПЕРЕНОСИМ в 2 ряда) */
@media (max-width: 768px) {
    .layout {
        padding: 20px 15px;
    }

    .glass-card {
        padding: 22px 18px;
    }

    .agency-services {
        gap: 30px;
    }

    .agency-row {
        flex-wrap: wrap; /* Теперь можно переносить */
        gap: 16px;
    }

    .agency-card {
        width: 145px;
        padding: 14px;
    }

    .agency-card img {
        height: 110px;
    }

    .agency-card span {
        font-size: 14px;
    }

    .quick-amounts {
        grid-template-columns: repeat(2, 1fr);
    }

    .topbar {
        padding: 14px 0;
    }

    .banner-image {
        height: 55px;
    }
}

/* 480px - Мобильные (по одной карточке) */
@media (max-width: 480px) {
    .layout {
        padding: 18px 12px;
    }

    .glass-card {
        padding: 20px 15px;
        border-radius: 18px;
    }

    .agency-services {
        gap: 20px;
    }

    .agency-row {
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }

    .agency-card {
        width: 100%;
        max-width: 280px;
    }

    .agency-card img {
        height: 140px;
    }

    .auth-box {
        padding: 30px 25px;
    }

    .custom-modal-content {
        padding: 25px 20px;
    }

    .topbar {
        padding: 12px 0;
    }

    .banner-image {
        height: 48px;
    }
}
/* ===============================================================
   TRAFFORD AGENCY - ФИКСЫ ДЛЯ ВНУТРЕННИХ СТРАНИЦ
   
   Добавь этот код В КОНЕЦ файла main.css
   или создай отдельный файл fixes.css и подключи после main.css
=============================================================== */

/* ================= СТРАНИЦА ЛИДОВ - СТИЛИЗАЦИЯ INPUT ================= */

/* Модалка покупки лида */
.lead-modal input[type="number"],
.lead-modal input[type="text"],
input.lead-quantity,
input[name="quantity"] {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 200, 0.25);
    background: rgba(20, 30, 45, 0.8);
    color: white;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.lead-modal input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.lead-modal input:focus {
    outline: none;
    border-color: #00ffd5;
    box-shadow: 0 0 20px rgba(0, 255, 213, 0.3);
}

/* Чекбокс интеграции с CRM */
.lead-modal input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #00ffd5;
}

.lead-modal label {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin-bottom: 16px;
    cursor: pointer;
}

/* ================= TRAFFORD PAY - КНОПКА ПРАВИЛА ================= */

/* Кнопка "Правила" на странице Trafford Pay */
.payment-rules-btn,
a[href*="pravila"],
button[onclick*="pravila"],
.rules-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    background: rgba(0, 255, 200, 0.08);
    border: 1px solid rgba(0, 255, 200, 0.25);
    color: #00ffd5;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-rules-btn:hover,
.rules-button:hover {
    background: rgba(0, 255, 200, 0.15);
    border-color: rgba(0, 255, 200, 0.45);
    box-shadow: 0 0 20px rgba(0, 255, 200, 0.25);
    transform: translateY(-2px);
}

/* Иконка рядом с кнопкой */
.payment-rules-btn::before,
.rules-button::before {
    content: "📋";
    font-size: 14px;
}

/* ================= МОИ ЗАПРОСЫ - БЛОЧНАЯ СТРУКТУРА ================= */

/* Контейнер запросов */
.requests-container,
#requestsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

/* Карточка запроса */
.request-card {
    position: relative;
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(10, 18, 30, 0.60), rgba(8, 14, 24, 0.45));
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(0, 234, 255, 0.12);
    transition: all 0.25s ease;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 25px rgba(0, 234, 255, 0.05);
    overflow: hidden;
}

/* Лёгкий верхний glow */
.request-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: radial-gradient(circle at 20% 10%, rgba(0, 234, 255, 0.08), transparent 50%);
    pointer-events: none;
}

.request-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 234, 255, 0.35);
    box-shadow:
        0 0 35px rgba(0, 234, 255, 0.25),
        0 35px 90px rgba(0, 0, 0, 1);
}

/* Верхняя строка карточки */
.request-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.request-type {
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 13px;
    text-transform: uppercase;
    opacity: 0.7;
    line-height: 1.2;
}

/* Правая часть (статус + кнопка открыть) */
.request-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* STATUS BADGE */
.request-status {
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

/* Статусы */
.status-pending {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.35);
    color: #ffc107;
}

.status-approved {
    background: rgba(0, 255, 170, 0.15);
    border: 1px solid rgba(0, 255, 170, 0.35);
    color: #00ffaa;
}

.status-rejected {
    background: rgba(255, 80, 80, 0.15);
    border: 1px solid rgba(255, 80, 80, 0.35);
    color: #ff4e4e;
}

.status-active {
    background: rgba(0, 234, 255, 0.15);
    border: 1px solid rgba(0, 234, 255, 0.35);
    color: #00eaff;
}

/* Body карточки */
.request-body p {
    margin-bottom: 8px;
    opacity: 0.8;
    font-size: 14px;
}

/* Кнопка "открыть" */
.details-btn {
    width: 92px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    background: rgba(0, 234, 255, 0.12);
    border: 1px solid rgba(0, 234, 255, 0.35);
    color: #00eaff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: 0.25s ease;
    user-select: none;
}

.details-btn:hover {
    background: rgba(0, 234, 255, 0.20);
    box-shadow: 0 0 20px rgba(0, 234, 255, 0.35);
    transform: translateY(-2px);
}

/* Actions (раскрывающаяся область) */
.request-actions {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.request-payment {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Статус "ждущие/активные" внутри раскрытия */
.status-wait {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

/* Условия */
.terms-box {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(0, 234, 255, 0.06);
    border: 1px solid rgba(0, 234, 255, 0.14);
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.55;
    font-size: 14px;
}

/* Баланс */
.balance-box {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(0, 255, 170, 0.06);
    border: 1px solid rgba(0, 255, 170, 0.14);
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
}

.balance-date {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.7;
}

/* Комментарий админа */
.admin-comment-box {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 200, 100, 0.06);
    border: 1px solid rgba(255, 200, 100, 0.14);
    margin-bottom: 14px;
}

.admin-comment-title {
    font-weight: 600;
    font-size: 13px;
    color: #ffc864;
    margin-bottom: 8px;
}

.admin-comment-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

/* Группа кнопок */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-group button {
    flex: 1;
    min-width: 140px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    transition: 0.25s ease;
}

/* Empty state */
.empty-state {
    padding: 60px 40px;
    text-align: center;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(10, 18, 30, 0.65), rgba(8, 14, 24, 0.50));
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(0, 234, 255, 0.12);
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.9),
        0 0 30px rgba(0, 234, 255, 0.06);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 18px;
    opacity: 0.7;
}

.empty-state h2 {
    font-size: 22px;
    margin-bottom: 12px;
}

.empty-state p {
    opacity: 0.75;
    max-width: 640px;
    margin: 0 auto 26px auto;
    line-height: 1.6;
}

/* ================= МОДАЛКА ЗАПРОСА ================= */

.request-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.request-modal.active {
    display: flex;
}

.request-modal-content {
    width: 520px;
    max-width: 92%;
    background: linear-gradient(160deg, rgba(10, 18, 30, 0.80), rgba(8, 14, 24, 0.65));
    border-radius: 20px;
    padding: 32px;
    border: 1px solid rgba(0, 234, 255, 0.25);
    box-shadow:
        0 0 45px rgba(0, 234, 255, 0.25),
        0 40px 120px rgba(0, 0, 0, 1);
    position: relative;
    animation: modalIn 0.25s ease;
}

.request-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 22px;
    cursor: pointer;
    opacity: 0.6;
    line-height: 1;
}

.request-close:hover {
    opacity: 1;
    color: #00eaff;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal info */
.modal-info {
    margin-bottom: 20px;
}

.modal-info p {
    margin-bottom: 10px;
    font-size: 14px;
}

/* ================= RESPONSIVE ДЛЯ ЗАПРОСОВ ================= */

@media (max-width: 1200px) {
    .requests-container,
    #requestsContainer {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .requests-container,
    #requestsContainer {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .request-card {
        padding: 20px;
    }

    .request-right {
        gap: 8px;
    }

    .details-btn {
        width: 86px;
    }

    .btn-group button {
        min-width: 120px;
    }
}

/* ================= ДОПОЛНИТЕЛЬНЫЕ ФИКСЫ ================= */

/* Все input на сайте должны быть в стиле */
input[type="text"]:not(.auth-box input),
input[type="email"]:not(.auth-box input),
input[type="number"]:not(.auth-box input),
input[type="password"]:not(.auth-box input),
textarea:not(.auth-box textarea) {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 200, 0.25);
    background: rgba(20, 30, 45, 0.8);
    color: white;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

input:not(.auth-box input)::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

input:not(.auth-box input):focus,
textarea:focus {
    outline: none;
    border-color: #00ffd5;
    box-shadow: 0 0 20px rgba(0, 255, 213, 0.3);
}

/* Кнопки на всех страницах */
button:not(.auth-box button):not(.btn-gold):not(.btn-dark):not(.btn-danger):not(.btn-secondary) {
    background: linear-gradient(135deg, #00ffd5, #00e0ff);
    border: none;
    color: #001a24;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

button:not(.auth-box button):not(.btn-gold):not(.btn-dark):not(.btn-danger):not(.btn-secondary):hover {
    box-shadow: 0 0 30px rgba(0, 255, 213, 0.6);
    transform: translateY(-2px);
}
/* ===============================================================
   TRAFFORD PAY - ПРАВИЛЬНЫЙ СТИЛЬ
   
   Блок "Обязательно к прочтению" + кнопка "Правила"
   Как на скрине 2
=============================================================== */

/* ================= HEADER СТРАНИЦЫ ================= */

.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 40px;
}

/* ЛЕВАЯ ЧАСТЬ - Инфо */
.payment-info {
    flex: 1;
}

.payment-info h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
}

.payment-info h1::before {
    content: "💳";
    font-size: 24px;
}

.payment-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 8px;
}

.payment-info p::before {
    content: "⏱";
    font-size: 14px;
    opacity: 0.7;
}

.payment-info p:nth-child(3)::before {
    content: "🕐";
}

.payment-info p:nth-child(4)::before {
    content: "💰";
}

/* ПРАВАЯ ЧАСТЬ - Предупреждение + Правила */
.payment-warning-box {
    width: 380px;
    flex-shrink: 0;
    padding: 20px 24px;
    border-radius: 16px;
    background: rgba(255, 160, 0, 0.08);
    border: 1px solid rgba(255, 160, 0, 0.25);
    box-shadow: 0 10px 40px rgba(255, 160, 0, 0.1);
}

.payment-warning-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #ffa500;
    margin-bottom: 12px;
}

.payment-warning-title::before {
    content: "⚠️";
    font-size: 16px;
}

.payment-warning-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 16px;
}

/* КНОПКА ПРАВИЛА - ЦИАНОВАЯ */
.payment-rules-btn,
.rules-button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00ffd5, #00e0ff);
    border: none;
    color: #001a24;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-rules-btn::before,
.rules-button::before {
    content: "📋";
    font-size: 16px;
}

.payment-rules-btn:hover,
.rules-button:hover {
    box-shadow: 0 0 30px rgba(0, 255, 213, 0.6);
    transform: translateY(-2px);
}

/* ================= АДАПТИВ ================= */

@media (max-width: 1200px) {
    .payment-header {
        flex-direction: column;
        gap: 25px;
    }

    .payment-warning-box {
        width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .payment-info h1 {
        font-size: 24px;
    }

    .payment-warning-box {
        padding: 18px 20px;
    }

    .payment-warning-text {
        font-size: 12px;
    }
    .profile-panel .btn-gold {
    background: linear-gradient(135deg, #00ffd5, #00e0ff) !important;
    color: #001018 !important;
}