* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #F7F8FA;
    --shadow-dark: rgba(15, 23, 42, 0.08);
    --shadow-light: rgba(255, 255, 255, 0.9);
    --gradient-start: #23D2F3;
    --gradient-end: #35A6E8;
    --text-title: #1F2A3C;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --icon-color: #4B5563;
    --white: #FFFFFF;
    --success: #16A34A;
    --danger: #DC2626;
    --warning: #F39C12;
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
}

/* Ensure profit chart in stats page is full-width inside its container */
.page#stats .chart-container {
    width: 100%;
}

.page#stats .chart-canvas#profit-chart {
    width: 100%;
    box-sizing: border-box;
}

.mobile-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    margin: 0 auto;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.1);
}

.page {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 100px;
}

.page.active {
    display: flex;
    flex-direction: column;
}

/* ============ HEADER ============ */
.header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 8px 16px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}

.profile-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
    transition: all 0.3s ease;
}

.header-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
}

/* ============ DASHBOARD PAGE ============ */
.dashboard-content {
    padding: 20px;
    gap: 20px;
}

/* Stats page darker theme */
.page#stats .dashboard-content {
    padding: 20px;
    gap: 20px;
}

.balance-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 22px;
    color: var(--text-primary);
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.04);
    margin-bottom: 10px;
}

.balance-card-dark {
    background: #FFFFFF;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

/* Main summary card for total profit */
.summary-card {
    background: linear-gradient(135deg, #E3F2FD, #FFFFFF);
    border-radius: 22px;
    padding: 24px;
}

.balance-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 500;
}

.balance-amount {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.balance-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.85;
}

.action-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

/* Quick access: full-width stacked buttons */
.action-cards.quick-actions {
    grid-template-columns: 1fr;
}

.action-cards.quick-actions .action-card {
    width: 100%;
    padding: 14px 16px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
}

.action-cards.quick-actions .action-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
}

.action-card {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.action-card p {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.crypto-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-title);
    margin: 20px 0 15px 0;
}

.crypto-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crypto-card {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 20px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.crypto-card:hover {
    transform: translateX(-4px);
    box-shadow: 0 10px 24px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.crypto-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.crypto-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.crypto-details h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.crypto-details p {
    font-size: 11px;
    color: var(--text-secondary);
}

.crypto-value {
    text-align: right;
}

.crypto-value h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.crypto-value p {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ============ TRADING PAGE ============ */
.trading-content {
    padding: 20px;
    gap: 20px;
}

.chart-container {
    background: linear-gradient(135deg, #FFFFFF, #F1F5F9);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.04);
    margin-bottom: 10px;
    width: 100%;
}

.chart-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 8px;
}

.chart-canvas {
    width: 100%;
    height: 180px;
    border-radius: 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 16px 14px 12px;
    gap: 6px;
    background: #FFFFFF;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
}

/* Profit chart container uses #profit-chart with dynamic height */
#profit-chart.chart-canvas {
    height: auto;
    min-height: 200px;
    align-items: flex-end;
    justify-content: space-between;
}

.chart-bar {
    width: 100%;
    background: linear-gradient(180deg, rgba(22, 163, 74, 0.9), rgba(22, 163, 74, 0.7));
    border-radius: 8px 8px 4px 4px;
    opacity: 0.9;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.chart-bar:hover {
    opacity: 1;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.22);
}

.chart-bar.active {
    opacity: 1;
}

/* ============ PROFIT CHART (STATS) ============ */
.profit-chart {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profit-bars {
    height: 150px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 10px 10px;
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.profit-bar-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.profit-bar {
    width: 100%;
    max-width: 22px;
    border-radius: 8px 8px 4px 4px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
    transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.profit-bar.pos {
    background: linear-gradient(180deg, rgba(22, 163, 74, 0.95), rgba(22, 163, 74, 0.75));
}

.profit-bar.neg {
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.95), rgba(220, 38, 38, 0.75));
}

.profit-bar-item:hover .profit-bar {
    transform: translateY(-4px);
    filter: brightness(1.04);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.22);
}

.profit-bar-label {
    font-size: 10px;
    color: var(--text-secondary);
}

.profit-bar-value.neg {
    color: var(--danger);
}

.profit-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.profit-kpi {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 14px 16px;
    text-align: center;
    border: 1px solid rgba(15, 23, 42, 0.05);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.profit-kpi-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
}

.profit-kpi-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    direction: ltr;
}

.trading-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-trade {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.btn-buy {
    background: linear-gradient(135deg, #2ECC71, #27AE60);
    color: white;
}

.btn-sell {
    background: linear-gradient(135deg, #E74C3C, #C0392B);
    color: white;
}

.btn-trade:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.slider-container {
    background: var(--bg-primary);
    border-radius: 25px;
    padding: 20px;
    box-shadow: 0 8px 20px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    margin-bottom: 20px;
}

.slider-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: inset 0 2px 4px var(--shadow-dark);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--white);
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    box-shadow: 0 6px 16px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--white);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
    transition: all 0.3s ease;
}

.slider::-moz-range-thumb:hover {
    box-shadow: 0 6px 16px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
    transform: scale(1.1);
}

.recent-trades {
    margin-top: 20px;
}

.recent-trades-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.trade-item {
    background: var(--bg-primary);
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 6px 16px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
}

.trade-info h5 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.trade-info p {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.trade-amount {
    text-align: right;
}

.trade-amount p {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.trade-amount span {
    font-size: 10px;
    color: var(--text-secondary);
}

/* ============ WALLET PAGE ============ */
.wallet-content {
    padding: 20px;
    gap: 20px;
}

.wallet-card {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 30px;
    padding: 30px;
    color: white;
    box-shadow: 0 12px 30px rgba(35, 210, 243, 0.25), inset -2px -2px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.wallet-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.wallet-amount {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.wallet-actions {
    display: flex;
    gap: 10px;
}

.wallet-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallet-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.add-balance-btn {
    background: var(--bg-primary);
    border-radius: 25px;
    padding: 16px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 8px 20px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.add-balance-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.chart-bar-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 150px;
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 20px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    margin-bottom: 20px;
    gap: 8px;
}

.bar {
    flex: 1;
    background: linear-gradient(180deg, var(--gradient-start), var(--gradient-end));
    border-radius: 10px 10px 0 0;
    box-shadow: 0 4px 12px var(--shadow-dark);
}

.assets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.asset-item {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 20px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.asset-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.asset-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.asset-details h5 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.asset-details p {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.asset-value {
    text-align: right;
}

.asset-value h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.asset-value p {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ============ BOTTOM NAVIGATION ============ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 90px;
    background: var(--bg-primary);
    border-radius: 35px 35px 0 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -12px 30px var(--shadow-dark), inset -2px 2px 5px var(--shadow-light);
    padding-bottom: 10px;
    z-index: 100;
}

.nav-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    color: var(--icon-color);
    font-size: 24px;
    box-shadow: 0 4px 12px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
}

@keyframes botFloat {
    0% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(-2px, 2px, 0); }
    50% { transform: translate3d(0, 4px, 0); }
    75% { transform: translate3d(2px, 2px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

.nav-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    box-shadow: 0 8px 20px rgba(35, 210, 243, 0.3), inset -2px -2px 5px rgba(0, 0, 0, 0.1);
}

.nav-add {
    width: 60px;
    height: 60px;
    border-radius: 25px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 28px;
    color: var(--icon-color);
    box-shadow: 0 6px 16px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    transition: all 0.3s ease;
}

.nav-add:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

/* ============ SWITCH STYLES ============ */
.switch-container {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.04);
    margin-bottom: 20px;
}

/* Bot switch as prominent dark card with floating icon */
.switch-container-bot {
    position: relative;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 24px 20px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.bot-floating-icon {
    position: absolute;
    top: -10px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: radial-gradient(circle at 30% 0, #23D2F3 0, #111 60%);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.7);
    animation: botFloat 4s ease-in-out infinite;
}

.switch-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.switch-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #E5E7EB;
    transition: 0.4s;
    border-radius: 28px;
    box-shadow: 0 4px 12px var(--shadow-dark), inset -1px -1px 3px var(--shadow-light);
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 6px var(--shadow-dark);
}

input:checked + .slider-toggle {
    background: #4B5563;
}

input:checked + .slider-toggle:before {
    transform: translateX(22px);
}

/* ============ SIGNAL STYLES ============ */
.signal-item {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 20px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    border-right: 4px solid var(--gradient-start);
}

.signal-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.signal-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.signal-pair {
    font-size: 11px;
    color: var(--text-secondary);
}

.signal-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(46, 204, 113, 0.1);
    color: var(--success);
}

/* ============ POSITION STYLES ============ */
.position-item {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.04);
    position: relative;
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.position-pair {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.position-type {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(46, 204, 113, 0.1);
    color: var(--success);
    letter-spacing: 0.2px;
}

.position-type.short {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
    letter-spacing: 0.2px;
}

.position-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    font-size: 11px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.03);
    border-radius: 12px;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 700;
    direction: ltr;
}

/* ============ SETTINGS STYLES ============ */
.settings-group {
    background: var(--bg-primary);
    border-radius: 25px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.settings-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.setting-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.setting-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.setting-input {
    width: 70px;
    padding: 8px 12px;
    border: none;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    box-shadow: inset 0 2px 4px var(--shadow-dark);
}

.setting-input:focus {
    outline: none;
    box-shadow: inset 0 2px 4px var(--shadow-dark), 0 0 8px rgba(35, 210, 243, 0.3);
}

.strategy-select {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    box-shadow: inset 0 2px 4px var(--shadow-dark);
    cursor: pointer;
}

.strategy-select:focus {
    outline: none;
    box-shadow: inset 0 2px 4px var(--shadow-dark), 0 0 8px rgba(35, 210, 243, 0.3);
}

/* ============ NOTIFICATION STYLES ============ */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #2D3436;
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease, slideUp 0.3s ease 2.7s;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* ============ SCROLLBAR ============ */
.page::-webkit-scrollbar {
    width: 6px;
}

.page::-webkit-scrollbar-track {
    background: transparent;
}

.page::-webkit-scrollbar-thumb {
    background: var(--shadow-dark);
    border-radius: 3px;
}

.page::-webkit-scrollbar-thumb:hover {
    background: var(--shadow-dark);
}

/* ============ BUTTON STYLES ============ */
.btn-save {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-save:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.btn-save:active {
    transform: translateY(-1px);
}

/* ============ TP LEVELS STYLES ============ */
.btn-add-tp-minimal {
    width: 32px;
    height: 32px;
    padding: 0;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-add-tp-minimal:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.btn-add-tp-minimal:active {
    transform: scale(0.95);
}

.tp-level-item {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    background: rgba(52, 152, 219, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.15);
    transition: all 0.2s ease;
}

.tp-level-item:hover {
    background: rgba(52, 152, 219, 0.12);
    border-color: rgba(52, 152, 219, 0.25);
}

.tp-level-input {
    flex: 1;
    padding: 8px 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.2s ease;
}

.tp-level-input:focus {
    outline: none;
    background: var(--bg-primary);
    box-shadow: inset 0 0 0 2px var(--gradient-start);
}

.tp-level-input::placeholder {
    color: var(--text-secondary);
}

.btn-remove-tp {
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(231, 76, 60, 0.1);
    color: #E74C3C;
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Vazirmatn', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-remove-tp:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.4);
    transform: scale(1.05);
}

.btn-remove-tp:active {
    transform: scale(0.95);
}

/* ============ MODAL STYLES ============ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 25px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn-confirm {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}

.modal-btn-cancel {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.modal-btn:hover {
    transform: translateY(-2px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============ TABLE STYLES ============ */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}

.table th {
    background: rgba(35, 210, 243, 0.1);
    padding: 12px;
    text-align: right;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table td {
    padding: 12px;
    font-size: 12px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background: rgba(35, 210, 243, 0.05);
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state-text {
    font-size: 14px;
    font-weight: 600;
}

/* ============ LOADING SPINNER ============ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(35, 210, 243, 0.3);
    border-radius: 50%;
    border-top-color: var(--gradient-start);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============ BADGE STYLES ============ */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success);
}

.badge-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

.badge-warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 480px) {
    .mobile-container {
        max-width: 100%;
        border-radius: 0;
    }

    .bottom-nav {
        border-radius: 0;
    }

    .dashboard-content {
        padding: 15px;
    }

    .balance-card {
        padding: 20px;
    }

    .action-cards {
        grid-template-columns: 1fr;
    }

    .trading-controls {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
    }

    .table {
        font-size: 11px;
    }

    .table th,
    .table td {
        padding: 8px;
    }
}

.profit-chart {
    width: 100%;
}

.symbol-picker-btn {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #FFFFFF;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    border-radius: 14px;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    min-width: 120px;
}

.symbol-picker-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(35, 210, 243, 0.12);
    color: var(--text-title);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.symbol-picker-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
    z-index: 1200;
}

.modal-backdrop.active {
    display: flex;
}

.crypto-picker {
    width: 100%;
    max-width: 480px;
    background: #FFFFFF;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.crypto-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.crypto-picker-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-title);
}

.crypto-picker-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #FFFFFF;
    cursor: pointer;
}

.crypto-picker-search {
    padding: 12px 16px;
}

#crypto-picker-search {
    width: 100%;
    padding: 12px 12px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.03);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 13px;
}

.crypto-picker-list {
    max-height: 50vh;
    overflow: auto;
    padding: 6px 10px 12px;
}

.crypto-picker-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 10px;
    border-radius: 14px;
    cursor: pointer;
}

.crypto-picker-item:hover {
    background: rgba(15, 23, 42, 0.03);
}

.crypto-picker-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.crypto-picker-symbol {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    direction: ltr;
}

.crypto-picker-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.crypto-picker-right {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-title);
}

.app-preloader {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.app-preloader.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.preloader-card {
    width: 100%;
    max-width: 280px;
    background: linear-gradient(135deg, #FFFFFF, #F1F5F9);
    border-radius: 22px;
    padding: 22px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.10);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.preloader-ring {
    width: 84px;
    height: 84px;
}

.preloader-ring svg {
    width: 84px;
    height: 84px;
    transform: rotate(-90deg);
}

.preloader-track {
    fill: none;
    stroke: rgba(15, 23, 42, 0.10);
    stroke-width: 6;
}

.preloader-progress {
    fill: none;
    stroke: var(--gradient-end);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 113.1;
    stroke-dashoffset: 113.1;
    transition: stroke-dashoffset 120ms linear;
}

.preloader-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
}