/* =========================
   BASE
========================= */
html, body {
    height: 100%;
    margin: 0;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: rgb(18, 20, 23);
    color: white;
}

.layout {
    display: flex;
    height: 100%;
    overflow: hidden;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    transition: margin-left 0.3s ease;
    overflow: hidden;
    min-height: 0;
}

.content {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.card {
    background: rgb(23, 26, 31);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

/* =========================
   LOGIN
========================= */

.login-wrapper {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.login-box {
    width: 420px;
    background: #111827;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
}

.login-box h1 {
    margin-bottom: 10px;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: #0b1220;
    border: 1px solid #2a3550;
    border-radius: 8px;
    color: white;
}

.login-box button {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: #8f9ae6;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: 250px;
    background: rgb(23, 26, 31);
    padding: 20px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    z-index: 50;
    flex-shrink: 0;
    min-height: 0;

    transition: width 0.3s ease, padding 0.3s ease;
}

.sidebar::-webkit-scrollbar {
    width: 0; /* Chrome, Edge, Safari */
    height: 0;
}

.logo {
    margin-bottom: 20px;
    color: rgb(168, 180, 247);
}

.menu-section {
    margin-bottom: 34px;
}

.menu-title {
    font-size: 13px;
    font-weight: 600;
    color: rgb(168, 180, 247);
    margin-bottom: 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: rgb(225, 225, 226);
    font-size: 14px;
    cursor: pointer;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.menu-item svg {
    width: 16px;
    height: 16px;
    stroke: rgb(168, 180, 247);
}

.logout {
    color: #ff6b6b;
    text-decoration: none;
}

/* =========================
   SWITCH
========================= */

.switch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sidebar > .switch-row {
    margin-bottom: 50px;
}

.switch-label {
    font-size: 13px;
    color: rgb(225, 225, 226);
}

.switch {
    position: relative;
    width: 38px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #374151;
    border-radius: 20px;
    transition: .2s;
}

.slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: .2s;
}

.switch input:checked + .slider {
    background: #22c55e;
}

.switch input:checked + .slider:before {
    transform: translateX(16px);
}

/* =========================
   TOPBAR
========================= */

.topbar {
    position: relative;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 30px;
    background: rgb(18, 20, 23);
    z-index: 200;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}


.topbar-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
}


.sidebar-toggle {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: none;
    background: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.sidebar-toggle svg {
    width: 20px;
    height: 20px;
    stroke: rgb(168, 180, 247);
}

.sidebar-toggle:hover {
    background: #1f2937;
    box-shadow: 0 0 12px rgba(168, 180, 247, 0.2);
}

.layout.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
    width: 0;
    padding: 0;
    overflow: hidden;
}

.balances {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 20px;
    position: relative;
    z-index: 210;
    margin-left: auto;
}

.balance {
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1f2937;
    background: #f3f4f6;
}

.grey {
    background: rgb(205, 213, 224);
}

.yellow {
    background: rgb(246, 213, 102);
}

.purple {
    background: rgb(168, 180, 247);
}

/* =========================
   PROFILE PANEL
========================= */

.profile-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: #0f141b;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding: 24px;

    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 300;
    pointer-events: none;
}

.profile-panel.open {
    transform: translateX(0);
    pointer-events: auto;
}

.profile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;

    z-index: 250;
}

.profile-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Карточка выхода */

.profile-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    border-radius: 16px;
    cursor: pointer;

    background: linear-gradient(
            145deg,
            rgba(20, 27, 37, 0.9),
            rgba(14, 19, 27, 0.9)
    );

    border: 1px solid rgba(255, 255, 255, 0.06);

    transition: all 0.2s ease;
}

.profile-item:hover {
    border-color: rgba(168, 180, 247, 0.4);
    box-shadow: 0 0 20px rgba(168, 180, 247, 0.15);
    transform: translateY(-2px);
}

.profile-btn {
    z-index: 400;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #111827; /* такой же тёмный как карточки */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.profile-btn svg {
    width: 18px;
    height: 18px;
    stroke: rgb(168, 180, 247);
}

.profile-btn:hover {
    background: #1f2937;
    box-shadow: 0 0 12px rgba(168, 180, 247, 0.2);
    transform: translateY(-1px);
}

/* Иконка */

.profile-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(168, 180, 247, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-icon svg {
    width: 22px;
    height: 22px;
    stroke: rgb(168, 180, 247);
}

/* Текст */

.profile-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.profile-sub {
    margin-top: 4px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* =========================
   MODAL (NEW DESIGN)
========================= */

.modal {
    z-index: 400;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    width: 420px;
    padding: 32px;
    border-radius: 20px;

    background: linear-gradient(
            145deg,
            rgba(20, 27, 37, 0.95),
            rgba(14, 19, 27, 0.95)
    );

    border: 1px solid rgba(168, 180, 247, 0.25);
    box-shadow: 0 0 40px rgba(168, 180, 247, 0.15);

    text-align: center;
    transform: translateY(20px);
    transition: all 0.25s ease;
}

.modal.show .modal-box {
    transform: translateY(0);
}

.modal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;

    border-radius: 50%;
    background: rgba(168, 180, 247, 0.1);

    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon svg {
    width: 26px;
    height: 26px;
    stroke: rgb(168, 180, 247);
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.modal-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 25px;
}

.modal-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;

    background: rgb(168, 180, 247);
    color: #111827;

    transition: 0.2s ease;
}

.modal-btn:hover {
    box-shadow: 0 0 20px rgba(168, 180, 247, 0.4);
    transform: translateY(-1px);
}

/* =========================
   TABLES
========================= */

.chart-placeholder {
    height: 260px;
    border-radius: 12px;
    background: rgb(23, 26, 31);
    border: 1px solid #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 20px;
}

.table-wrapper {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.custom-table thead {
    background: rgb(23, 26, 31);
}

.custom-table th {
    text-align: left;
    padding: 14px;
    font-weight: 600;
    color: rgb(168, 180, 247);
    border-bottom: 1px solid #1f2937;
}

.custom-table td {
    padding: 14px;
    border-bottom: 1px solid #1f2937;
    color: rgba(255, 255, 255, 0.85);
}

.custom-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.empty-row {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 30px 0;
}

.table-btn {
    width: auto;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;

    background: rgb(168, 180, 247);
    color: #111827;

    transition: 0.2s ease;
}

.table-btn:hover {
    box-shadow: 0 0 12px rgba(168, 180, 247, 0.4);
    transform: translateY(-1px);
}

.balance-dropdown {
    cursor: pointer;
    position: relative;
}

.balance-arrow {
    width: 14px;
    height: 14px;
}

.balance-menu {
    position: absolute;
    top: 60px;
    right: 0;
    width: 180px;
    background: #111827;
    border-radius: 12px;
    border: 1px solid rgba(168, 180, 247, 0.2);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);

    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
    z-index: 500;
}

.balance-menu.show {
    opacity: 1;
    pointer-events: auto;
}

.balance-option {
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    align-items: center;
    cursor: pointer;
}

.balance-option:hover {
    background: rgba(168, 180, 247, 0.1);
}

/* =========================
   DEPOSIT FLOW (NEW UI)
========================= */

.deposit-flow .deposit-box {
    width: 600px;
    background: #111827;
    border-radius: 18px;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
}

.deposit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.deposit-title {
    font-size: 24px;
    font-weight: 600;
}

.deposit-close {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.deposit-close:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* STEPS */

.deposit-steps {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #9ca3af;
}

.step.active .step-circle {
    background: #e5e7eb;
    color: #111827;
}

.step-label {
    font-size: 13px;
    color: #9ca3af;
}

.step-line {
    flex: 1;
    height: 1px;
    background: #374151;
    margin: 0 10px;
}

/* STEP CONTENT */

.deposit-text {
    color: #9ca3af;
    margin-bottom: 25px;
    line-height: 1.6;
}

.deposit-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.deposit-field input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #374151;
    background: #0b1220;
    color: white;
}

/* BUTTONS */

.deposit-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 30px;
}

.deposit-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.deposit-btn.primary {
    background: #8f9ae6;
    color: #111827;
}

.deposit-btn.secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.deposit-btn:hover {
    opacity: 0.9;
}

/* STEP 2 */

.deposit-info-block {
    margin-bottom: 20px;
}

.info-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.wallet-row {
    background: #0b1220;
    padding: 12px;
    border-radius: 10px;
    font-family: monospace;
    word-break: break-all;
}

.network {
    background: #0b1220;
    padding: 12px;
    border-radius: 10px;
}

.deposit-warning {
    margin: 20px 0;
    color: #9ca3af;
    line-height: 1.6;
}

.deposit-check {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.check-left {
    font-size: 18px;
    font-weight: 600;
}

.check-timer {
    font-size: 40px;
    font-weight: 700;
}

/* PASSWORD CLOSE BUTTON */

.password-close {
    position: absolute;
    top: 18px;
    right: 18px;

    width: 36px;
    height: 36px;

    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);

    color: white;
    cursor: pointer;
    font-size: 14px;

    transition: 0.2s ease;
}

.password-close:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(168, 180, 247, 0.4);
}

/* DEVICE CARD */

.device-card {
    background: #111827;
    border-radius: 18px;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.device-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.device-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(168, 180, 247, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-icon svg {
    width: 32px;
    height: 32px;
    stroke: rgb(168, 180, 247);
}

.device-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.device-sub {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
}

.device-meta {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.45);
}

.device-badge {
    background: #e5e7eb;
    color: #16a34a;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 12px;
}
