/* ============================================
   RAV TRADER WEB TERMINAL — app.css v2
   Desktop-First · Professional · Clean
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --bg-elevated: #202020;
    --bg-hover: #252525;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --green: #00ff64;
    --green-dim: rgba(0, 255, 100, 0.15);
    --red: #ff5050;
    --red-dim: rgba(255, 80, 80, 0.15);
    --lime: #c9fd06;
    --lime-dim: rgba(201, 253, 6, 0.08);
    --amber: #ff9600;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #666666;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'Inter', sans-serif;
    --sidebar-w: 240px;
    --header-h: 56px;
    --ticker-h: 48px;
    --radius: 8px;
    --radius-lg: 12px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

input,
button,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ========= LAYOUT ========= */
.app-shell {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ========= SIDEBAR ========= */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-brand {
    padding: 22px 20px;
    border-bottom: 1px solid var(--border);
}

.brand-logo {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #fff;
}

.brand-logo em {
    font-style: normal;
    color: var(--lime);
}

.brand-badge {
    margin-top: 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--lime);
    background: var(--lime-dim);
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 1.5px;
    display: inline-block;
}

.sidebar-nav {
    flex: 1;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s var(--ease);
    border: 1px solid transparent;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: #fff;
}

.nav-item.active {
    background: var(--lime-dim);
    color: var(--lime);
    border-color: rgba(201, 253, 6, 0.12);
    font-weight: 600;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(0, 255, 100, 0.3), rgba(201, 253, 6, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.sidebar-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-links a svg {
    width: 16px;
    height: 16px;
}

/* ========= MAIN ========= */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* Header */
.top-header {
    height: var(--header-h);
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.header-welcome {
    font-size: 16px;
    font-weight: 600;
}

.header-welcome span {
    color: var(--lime);
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hdr-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 14px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.hdr-btn:hover {
    border-color: var(--border-hover);
    color: #fff;
}

.hdr-btn.ai {
    border-color: rgba(201, 253, 6, 0.2);
    color: var(--lime);
}

.hdr-btn.ai:hover {
    background: var(--lime-dim);
}

.hdr-btn svg {
    width: 16px;
    height: 16px;
}

.live-dot {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius);
    background: rgba(0, 255, 100, 0.1);
    border: 1px solid rgba(0, 255, 100, 0.3);
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.live-dot::before {
    content: '';
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
    animation: liveBlink 2s ease-in-out infinite;
}

@keyframes liveBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.notif-btn {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-secondary);
    padding: 0 4px;
}

/* Ticker */
.ticker-bar {
    height: var(--ticker-h);
    min-height: var(--ticker-h);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.ticker-bar::before,
.ticker-bar::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    z-index: 2;
    pointer-events: none;
}

.ticker-bar::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg-primary), transparent);
}

.ticker-bar::after {
    right: 0;
    background: linear-gradient(270deg, var(--bg-primary), transparent);
}

.ticker-track {
    display: flex;
    align-items: center;
    gap: 36px;
    height: 100%;
    animation: tickerScroll 40s linear infinite;
    padding-left: 16px;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 4px 0;
}

.ticker-sym {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
}

.ticker-price {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--mono);
    transition: color 0.3s ease;
}

.ticker-price.flash-green {
    color: var(--green);
    text-shadow: 0 0 8px rgba(0, 255, 100, 0.4);
}

.ticker-price.flash-red {
    color: var(--red);
    text-shadow: 0 0 8px rgba(255, 80, 80, 0.4);
}

.ticker-chg {
    font-size: 13px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.ticker-chg.up {
    color: var(--green);
    background: rgba(0, 255, 100, 0.08);
}

.ticker-chg.dn {
    color: var(--red);
    background: rgba(255, 80, 80, 0.08);
}

@keyframes tickerScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ========= CONTENT AREA ========= */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: panelIn 0.25s ease;
}

@keyframes panelIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.section-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 22px;
}

/* ========= BUTTONS ========= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s;
    font-size: 14px;
    padding: 10px 20px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--lime);
    color: #000;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.btn-danger {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(255, 80, 80, 0.15);
}

.btn-danger:hover {
    background: rgba(255, 80, 80, 0.2);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn svg {
    width: 16px;
    height: 16px;
}

/* ========= FORM ========= */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: #fff;
    font-size: 15px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: rgba(201, 253, 6, 0.35);
    box-shadow: 0 0 0 3px rgba(201, 253, 6, 0.06);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-hint.success {
    color: var(--green);
}

/* ========= COIN FILTER ========= */
.coin-filter {
    display: inline-flex;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3px;
    margin-bottom: 22px;
}

.coin-filter label {
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.coin-filter input {
    display: none;
}

.coin-filter label:has(input:checked) {
    background: var(--lime-dim);
    color: var(--lime);
}

/* ========= SIGNAL CARDS ========= */
.signals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 16px;
}

.signal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.25s;
}

.signal-card:hover {
    border-color: var(--border-hover);
}

.signal-card-top {
    padding: 18px 20px 0;
}

.signal-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.signal-pair-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.signal-pair {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.cashback-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--green);
    background: var(--green-dim);
    border: 1px solid rgba(0, 255, 100, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.type-badge {
    font-size: 12px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.type-badge.long {
    background: var(--green-dim);
    color: var(--green);
}

.type-badge.short {
    background: var(--red-dim);
    color: var(--red);
}

/* Signal detail rows */
.signal-rows {}

.signal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.signal-row-label {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.signal-row-label svg {
    width: 14px;
    height: 14px;
}

.signal-row-value {
    font-size: 16px;
    font-weight: 700;
    font-family: var(--mono);
}

.signal-row-value.green {
    color: var(--green);
}

.signal-row-value.red {
    color: var(--red);
}

.signal-row-pct {
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 4px;
}

.signal-row-pct.green {
    background: var(--green-dim);
    color: var(--green);
}

.signal-row-pct.red {
    background: var(--red-dim);
    color: var(--red);
}

.signal-meta-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 13px;
    color: var(--text-muted);
}

.signal-meta-bar strong {
    color: var(--text-secondary);
    margin-left: 3px;
}

.signal-actions-bar {
    display: flex;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.01);
}

.signal-actions-bar .btn {
    flex: 1;
}

/* ========= EMPTY STATE ========= */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.radar-anim {
    width: 70px;
    height: 70px;
    position: relative;
    margin-bottom: 22px;
}

.radar-ring {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(201, 253, 6, 0.2);
    border-radius: 50%;
}

.radar-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--lime));
    transform-origin: left center;
    animation: radarSpin 2s linear infinite;
}

.radar-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: var(--lime);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px var(--lime);
}

@keyframes radarSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 22px;
    max-width: 320px;
}

/* ========= POSITIONS ========= */
.order-book {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.ob-header {
    display: grid;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ob-header.active-hdr {
    grid-template-columns: 2.5fr 1fr 1fr 1.5fr;
}

.ob-header.hist-hdr {
    grid-template-columns: 2.5fr 1fr 1.5fr;
}

.pos-row {
    display: grid;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.025);
    transition: background 0.15s;
}

.pos-row:hover {
    background: rgba(255, 255, 255, 0.015);
}

.pos-row:last-child {
    border-bottom: none;
}

.pos-row.active-row {
    grid-template-columns: 2.5fr 1fr 1fr 1.5fr;
}

.pos-row.hist-row {
    grid-template-columns: 2.5fr 1fr 1.5fr auto;
    gap: 8px;
}

.pos-pair {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 3px;
}

.pos-type {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.pos-type.long {
    background: var(--green-dim);
    color: var(--green);
}

.pos-type.short {
    background: var(--red-dim);
    color: var(--red);
}

.pos-val {
    text-align: right;
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.pos-roi {
    text-align: right;
    font-family: var(--mono);
    font-size: 15px;
    font-weight: 700;
}

.pos-roi.up {
    color: var(--green);
}

.pos-roi.dn {
    color: var(--red);
}

.hist-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.filter-btn {
    flex: 1;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.filter-btn:hover {
    border-color: var(--border-hover);
    color: #fff;
}

.filter-btn.active {
    background: var(--lime-dim);
    border-color: rgba(201, 253, 6, 0.15);
    color: var(--lime);
}

.empty-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 44px;
    color: var(--text-muted);
    font-size: 14px;
}

.empty-placeholder svg {
    opacity: 0.15;
    margin-bottom: 14px;
}

/* ========= REWARDS ========= */
.rewards-hero {
    background: linear-gradient(135deg, rgba(201, 253, 6, 0.1), rgba(10, 10, 10, 0));
    border: 1px solid rgba(201, 253, 6, 0.2);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    text-align: center;
    margin-bottom: 28px;
}

.rewards-hero-label {
    font-size: 11px;
    color: var(--lime);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.rewards-hero-val {
    font-size: 48px;
    font-weight: 900;
    font-family: var(--mono);
    color: #fff;
}

.rewards-hero-val small {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
    margin-left: 8px;
}

.rewards-rate {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 12px;
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
}

.missions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.mission-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 16px 20px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.mission-card:hover {
    border-color: var(--border-hover);
}

.mission-icon {
    font-size: 22px;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--lime-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mission-info {
    flex: 1;
}

.mission-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.mission-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.mission-pts {
    font-size: 14px;
    font-weight: 700;
    color: var(--lime);
    white-space: nowrap;
}

.withdraw-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
}

/* ========= NEWS ========= */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 14px;
}

.news-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.news-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.news-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.news-body {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.sent-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}

.sent-tag.bullish {
    background: var(--green-dim);
    color: var(--green);
}

.sent-tag.bearish {
    background: var(--red-dim);
    color: var(--red);
}

.sent-tag.neutral {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
}

/* ========= SETTINGS ========= */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 720px;
}

.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.ss-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ss-title svg {
    width: 16px;
    height: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.info-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.info-val {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.mode-toggle {
    display: flex;
    gap: 12px;
}

.mode-card {
    flex: 1;
    padding: 20px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.mode-card:hover {
    border-color: var(--border-hover);
}

.mode-card.active {
    background: var(--lime-dim);
    border-color: rgba(201, 253, 6, 0.2);
}

.mode-card svg {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.mode-card.active svg {
    color: var(--lime);
}

.mode-card .mode-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.mode-card .mode-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-row-label {
    font-size: 15px;
    font-weight: 500;
}

.settings-row-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition: all 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    left: 3px;
    bottom: 3px;
    transition: all 0.2s;
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--lime);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
    background: #000;
}

/* ========= MODALS ========= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 92%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #fff;
}

.modal-close svg {
    width: 22px;
    height: 22px;
}

/* ========= TOASTS ========= */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
    max-width: 380px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    animation: toastIn 0.3s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.toast.success {
    border-left: 3px solid var(--green);
}

.toast.error {
    border-left: 3px solid var(--red);
}

.toast.info {
    border-left: 3px solid var(--lime);
}

.toast.warning {
    border-left: 3px solid var(--amber);
}

.toast-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.toast-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

@keyframes toastIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Notif Dropdown */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 500;
}

.notif-dropdown.active {
    display: block;
}

.notif-dropdown-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
}

.notif-item {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.notif-item.unread {
    background: rgba(201, 253, 6, 0.02);
}

.notif-item-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 3px;
}

.notif-item-text {
    color: var(--text-muted);
    font-size: 12px;
}

.notif-item-time {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 4px;
}

/* AI Segments */
.ai-seg {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 12px;
}

.ai-seg-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.ai-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ai-stat {
    text-align: center;
}

.ai-stat-l {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ai-stat-v {
    font-size: 17px;
    font-weight: 700;
    font-family: var(--mono);
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--lime);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Leverage grid */
.lev-grid {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.lev-btn {
    padding: 8px 14px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.lev-btn:hover {
    border-color: var(--border-hover);
    color: #fff;
}

.lev-btn.active {
    background: var(--lime-dim);
    border-color: rgba(201, 253, 6, 0.25);
    color: var(--lime);
}

/* Checkbox */
.check-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.check-wrap input {
    width: 18px;
    height: 18px;
    accent-color: var(--lime);
    margin-top: 1px;
    cursor: pointer;
}

.check-wrap span {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 960px) {
    .sidebar {
        width: 64px;
        min-width: 64px;
    }

    .brand-logo,
    .brand-badge,
    .nav-item span,
    .sidebar-user-info,
    .sidebar-links a span {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 14px;
    }

    .sidebar-user {
        justify-content: center;
        padding: 10px;
    }

    .sidebar-links a {
        justify-content: center;
    }

    .content-area {
        padding: 20px;
    }

    .signals-grid {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* ========= MISSION CARDS ========= */
.missions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}

.mission-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
}

.mission-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-elevated);
}

.mission-card.claimed {
    opacity: 0.45;
    pointer-events: none;
}

.mission-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid;
}

.mission-icon svg {
    width: 20px;
    height: 20px;
}

.mission-info {
    flex: 1;
    min-width: 0;
}

.mission-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.mission-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.mission-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.mission-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.mission-right {
    flex-shrink: 0;
}

.mission-claimed {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--green);
    font-weight: 600;
}

.mission-claimed svg {
    width: 16px;
    height: 16px;
}

.mission-pts-badge {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.mission-claim-btn {
    font-size: 12px !important;
    padding: 6px 14px !important;
}

/* ========= CLAIM ANIMATION ========= */
.mission-card.claiming {
    background: rgba(201, 253, 6, 0.05);
    border-color: rgba(201, 253, 6, 0.3);
    transform: scale(1.01);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.claim-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.5s linear infinite;
}

.pts-floater {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 800;
    color: var(--lime);
    animation: floatUp 0.8s ease-out forwards;
    z-index: 10;
    pointer-events: none;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(-50%) scale(0.8);
    }

    50% {
        opacity: 1;
        transform: translateY(-70%) scale(1.1);
    }

    100% {
        opacity: 0;
        transform: translateY(-120%) scale(1);
    }
}

/* ========= LEVERAGE SLIDER ========= */
.lev-slider-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lev-display {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--lime);
    letter-spacing: -0.02em;
}

.lev-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lev-label-min,
.lev-label-max {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}

.lev-range {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.lev-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--lime);
    border: 3px solid #000;
    box-shadow: 0 0 10px rgba(201, 253, 6, 0.3);
    cursor: grab;
    transition: box-shadow 0.2s;
}

.lev-range::-webkit-slider-thumb:hover {
    box-shadow: 0 0 20px rgba(201, 253, 6, 0.5);
}

.lev-range::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.lev-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--lime);
    border: 3px solid #000;
    box-shadow: 0 0 10px rgba(201, 253, 6, 0.3);
    cursor: grab;
}

.lev-presets {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.lev-preset-btn {
    padding: 5px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.lev-preset-btn:hover {
    border-color: rgba(201, 253, 6, 0.3);
    color: var(--lime);
    background: rgba(201, 253, 6, 0.05);
}

/* ========= AFFILIATE PANEL ========= */
.aff-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(201, 253, 6, 0.06), rgba(201, 253, 6, 0.02));
    border: 1px solid rgba(201, 253, 6, 0.15);
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
}

.aff-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(201, 253, 6, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lime);
    flex-shrink: 0;
}

.aff-hero-icon svg {
    width: 24px;
    height: 24px;
}

.aff-hero-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.aff-hero-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.aff-section {
    margin-bottom: 28px;
}

.aff-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 16px;
}

.aff-code {
    font-size: 22px;
    font-weight: 800;
    color: var(--lime);
    font-family: var(--mono);
    letter-spacing: 2px;
}

.aff-link-box {
    margin-top: 12px;
}

.aff-link-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.aff-link-row .form-input {
    flex: 1;
}

.aff-share-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.aff-share-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.aff-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.aff-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
}

.aff-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.aff-stat-icon svg {
    width: 18px;
    height: 18px;
}

.aff-stat-val {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.aff-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aff-table {
    width: 100%;
    border-collapse: collapse;
}

.aff-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.aff-table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.aff-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.aff-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.aff-step-num {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(201, 253, 6, 0.08);
    color: var(--lime);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
}

.aff-step-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
}

.aff-step-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 960px) {
    .aff-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   RISK MANAGEMENT  Quick Select Buttons
   ============================================ */
.lev-quick-btn,
.margin-quick-btn,
.pct-quick-btn {
    flex: 1;
    padding: 10px 6px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #999;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 48px;
    text-align: center;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.lev-quick-btn:hover,
.margin-quick-btn:hover,
.pct-quick-btn:hover {
    border-color: rgba(201, 253, 6, 0.2);
    color: #ddd;
    background: rgba(20, 20, 20, 0.9);
}

.lev-quick-btn.active,
.margin-quick-btn.active,
.pct-quick-btn.active {
    background: rgba(201, 253, 6, 0.08);
    border-color: rgba(201, 253, 6, 0.35);
    color: #c9fd06;
    box-shadow: 0 0 8px rgba(201, 253, 6, 0.08);
}

/* Settings form inputs  force dark theme */
.settings-section .form-input,
.settings-section input[type="number"],
.settings-section input[type="text"],
.settings-section input[type="password"] {
    background: rgba(10, 10, 10, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.settings-section .form-input:focus,
.settings-section input[type="number"]:focus,
.settings-section input[type="text"]:focus,
.settings-section input[type="password"]:focus {
    outline: none;
    border-color: rgba(201, 253, 6, 0.35) !important;
    box-shadow: 0 0 0 3px rgba(201, 253, 6, 0.06);
}

/* Settings section card polish */
.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
}