/* TAB STYLING */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    /*border-bottom: 2px solid #333;*/
}

.history-trade{
        border: 1px solid #00ffaa17;
        margin: 5px;
        padding: 10px;
        border-radius: 5px;
}
.tab-btn {
    padding: 12px 28px;
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: #ddd;
}

.tab-btn.active-tab {
    color: #00ffaa;
    font-weight: 600;
}

.tab-btn.active-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #00ffaa;
    border-radius: 4px;
}

/* Tab Content */
.tab-content {
    display: none;          
}

.tab-content.active-trade {  
    display: block;
}
/* =========================
POPUP CREATE AGENT - IMPROVED
========================= */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.popup.show {
    display: flex !important;
}

.popup-box {
    background: #0f0f0f;
    border: 1px solid #1f1f1f;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 240, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Glow effect di border */
.popup-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 18px;
    background: linear-gradient(45deg, #00f0ff, #00d4ff);
    z-index: -1;
    opacity: 0.15;
    filter: blur(8px);
}

.popup-box h3 {
    color: #00f0ff;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 600;
}

.popup-box p {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.popup-box input {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #1f1f1f;
    border-radius: 10px;
    padding: 14px 16px;
    color: #e5e7eb;
    font-size: 15px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.popup-box input:focus {
    outline: none;
    border-color: #00f0ff;
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15);
}

/* Popup Actions */
.popup-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 10px;
}

.popup-actions button {
    padding: 13px 28px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    max-width: 180px;
}

.popup-actions .btn-primary {
    background: linear-gradient(90deg, #00f0ff, #00d4ff);
    color: #000;
    font-weight: 700;
}

.popup-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 240, 255, 0.3);
}

.popup-actions .cancel {
    background: #1f1f1f;
    color: #e5e7eb;
    border: 1px solid #363636;
}

.popup-actions .cancel:hover {
    background: #2a2a2a;
    border-color: #555;
}

.cancel {
    background: #555;
    color: white;
}

.btn-primary {
    background: #00d4ff;
    color: black;
    margin-top:10px;
}/* =========================
WALLET BUTTON
========================= */
#walletBtn{
    background:#0a0a0a;
    border:1px solid #1f1f1f;
    color:#e5e7eb;

    padding:10px 14px;
    border-radius:10px;

    font-size:12px;
    cursor:pointer;

    display:flex;
    align-items:center;
    gap:8px;

    transition:0.2s ease;
}

/* hover subtle */
#walletBtn:hover{
    border-color:#00f0ff55;
    background:#0f0f0f;
}

/* connected state */
#walletBtn.connected{
    border-color:#00f0ff33;
    color:#00f0ff;
}

/* address text (shortened) */
.wallet-address{
    font-size:11px;
    color:#6b7280;
}

/* dot indicator */
.wallet-dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:#ff4d4f;
}

/* connected dot */
#walletBtn.connected .wallet-dot{
    background:#00ffaa;
}
/* =========================
DASHBOARD WRAPPER
========================= */
.dashboard-container{
    /*max-width:1000px;*/
    margin:0 auto;
    display:flex;
    flex-direction:column;
    gap:16px;
    padding: 20px;
}

/* =========================
HEADER
========================= */
.dashboard-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.dashboard-header h2{
    font-size:18px;
    font-weight:600;
}

/* =========================
KPI (MINIMAL)
========================= */
.kpi-row{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:10px;
}

.kpi-box{
    /*background:#0f0f0f;*/
    border:1px solid #00ffaa17;
    border-radius:12px;
    padding:12px;
    transition:0.2s ease;
}

.kpi-box:hover{
    border-color:#00f0ff33;
}

.kpi-box span{
    font-size:11px;
    color:#6b7280;
}
.create-agent-span{
    font-size:11px;
    color:#6b7280;
}
.kpi-box b{
    display:block;
    margin-top:4px;
    font-size:12px;
    color: #bbbbbb;
}

/* =========================
MAIN GRID
========================= */
.dashboard-grid{
    display:grid;
    grid-template-columns:1.6fr 1fr;
    gap:14px;
}

@media(max-width:768px){
    .kpi-row{
        grid-template-columns:1fr 1fr;
    }

    .dashboard-grid{
        grid-template-columns:1fr;
    }
}

/* =========================
CARD
========================= */
.d-card{
    /*background:#0f0f0f;*/
    border:1px solid #00ffaa17;
    border-radius:14px;
    padding:14px;
}

/* =========================
TRADES
========================= */
.trade-item{
    display:flex;
    justify-content:space-between;
    padding:10px 6px;
    border-bottom:1px solid #1a1a1a;
}

.trade-item:last-child{
    border-bottom:none;
}

.trade-left b{
    font-size:13px;
}

.trade-left span{
    font-size:11px;
    color:#6b7280;
}

.trade-right{
    font-size:13px;
    font-weight:600;
}

.trade-right.profit{
    color:#00ffaa;
}

.trade-right.loss{
    color:#ff4d4f;
}

/* =========================
TABS
========================= */
.tabs{
    display:flex;
    gap:6px;
    margin-bottom:10px;
}

.tab{
    flex:1;
    padding:8px;
    border-radius:8px;
    background:#0a0a0a;
    border:1px solid #1f1f1f;
    font-size:12px;
    cursor:pointer;
}

.tab.active{
    border-color:#00f0ff55;
}

/* =========================
SETTINGS
========================= */
.settings input,
.settings select{
    width:100%;
    margin-top:6px;
    margin-bottom:10px;

    background:linear-gradient(45deg, #00ffeb17, transparent);
    border:1px solid #1f1f1f;
    border-radius:10px;

    padding:10px;
    color:#fff;
    font-size:12px;
}

/* =========================
BUTTON (MATCH STYLE)
========================= */
.btn{
    background:#509164;
    border:1px solid #0dff0030;
    padding:10px;
    border-radius:10px;
    font-size:12px;
    cursor:pointer;
    transition:0.2s;
    color: white;
}

.btn:hover{
    border-color:#00f0ff55;
}

/* =========================
EMPTY STATE
========================= */
.empty-state{
    text-align:center;
    padding:20px;
    color:#6b7280;
    font-size:13px;
}