/* ===== Nave Trading OS — Admin panel: users, trades, system status, bot management, trading panel ===== */
/* Extracted from style.css — 2026-06-19 */

/* ===== ADMIN PANEL ===== */
.admin-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    background: var(--card-bg);
    padding: 0.25rem;
    border-radius: var(--radius-md);
}
.admin-tab {
    flex: 1;
    padding: 0.6rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: calc(var(--radius-md) - 2px);
    transition: all 0.15s;
}
.admin-tab:hover { color: var(--text-primary); }
.admin-tab.active {
    background: var(--accent);
    color: white;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.admin-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}
.admin-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}
.admin-table tr:hover td { background: rgba(255,255,255,0.03); }
.admin-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}
.admin-badge.active { background: rgba(56,189,248,0.15); color: var(--win); }
.admin-badge.inactive { background: rgba(226,232,240,0.15); color: var(--loss); }
.admin-badge.admin { background: rgba(59,130,246,0.15); color: var(--accent); }
.admin-filter-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.admin-filter-row select {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.admin-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-size: 0.9rem;
}
.admin-actions {
    display: flex;
    gap: 0.35rem;
}

/* ===== TRADING PANEL ===== */
.trading-panel {
    position: fixed;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    max-height: calc(100vh - 60px);
    z-index: 100;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.2s;
}
.trading-panel.collapsed .trading-panel-body { display: none; }
.trading-panel.collapsed { width: auto; }
.trading-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    cursor: grab;
    font-size: 0.85rem;
    font-weight: 600;
    user-select: none;
}
.trading-panel-header:active { cursor: grabbing; }
.trading-panel-controls {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
}
.tp-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
}
.tp-toggle-btn:hover { color: var(--text-primary); }
.trading-panel-body {
    overflow-y: auto;
    flex: 1;
}
.tp-section {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    background: #0b0f19;
}
.tp-section:last-child { border-bottom: none; }
.tp-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    font-weight: 600;
}
.tp-input-row {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}
.tp-input {
    flex: 1;
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-family: inherit;
}
.tp-input:focus { outline: none; border-color: var(--accent); }
.tp-btn-row {
    display: flex;
    gap: var(--gap-sm);
}
.tp-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.tp-btn.tp-buy {
    background: linear-gradient(135deg, rgba(56,189,248,0.2), rgba(99,102,241,0.15));
    color: #fff;
    border: 1px solid rgba(56,189,248,0.35);
    text-shadow: 0 0 10px rgba(56,189,248,0.3);
}
.tp-btn.tp-buy:hover { background: linear-gradient(135deg, rgba(56,189,248,0.35), rgba(99,102,241,0.25)); box-shadow: 0 0 16px rgba(56,189,248,0.2); }
.tp-btn.tp-sell {
    background: rgba(226,232,240,0.12);
    color: var(--text-primary);
    border: 1px solid rgba(226,232,240,0.25);
}
.tp-btn.tp-sell:hover { background: rgba(226,232,240,0.22); box-shadow: 0 0 12px rgba(226,232,240,0.1); }
.tp-positions-list {
    max-height: 200px;
    overflow-y: auto;
}
.tp-empty {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.5rem;
}
.tp-position-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.75rem;
    gap: 0.35rem;
}
.tp-position-item:last-child { border-bottom: none; }
.tp-pos-symbol { font-weight: 600; min-width: 55px; font-size: 0.72rem; }
.tp-pos-type { font-size: 0.65rem; padding: 0.1rem 0.35rem; border-radius: 4px; font-weight: 600; }
.tp-pos-type.buy { background: rgba(56,189,248,0.2); color: var(--win); }
.tp-pos-type.sell { background: rgba(226,232,240,0.12); color: var(--loss); }
.tp-pos-info { font-size: 0.7rem; color: var(--text-secondary); min-width: 40px; text-align: right; }
.tp-pos-profit { font-weight: 600; min-width: 55px; text-align: right; font-size: 0.72rem; }
.tp-pos-profit.positive { color: var(--win); }
.tp-pos-profit.negative { color: var(--loss); }
.tp-pos-sl-tp { display: flex; gap: 2px; }
.tp-pos-sl-tp input {
    width: 50px;
    font-size: 0.65rem;
    padding: 0.15rem 0.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 4px;
    font-family: inherit;
}
.tp-close-btn {
    background: none;
    border: none;
    color: var(--loss);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0 2px;
}
.tp-close-btn:hover { opacity: 0.7; }
.tp-margin-alert {
    background: rgba(226,232,240,0.1);
    border: 1px solid rgba(226,232,240,0.3);
    color: var(--loss);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.68rem;
    text-align: center;
    margin: 0.35rem 0.75rem;
    display: none;
}
.tp-margin-alert.show { display: block; }
/* Daily loss limit bar */
.tp-loss-limit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
}
.tp-loss-bar-wrap {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}
.tp-loss-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background: var(--win);
    transition: width 0.5s ease, background 0.5s ease;
}
.tp-loss-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-secondary);
    opacity: 0.8;
}
/* Admin capital inputs */
.admin-capital-input {
    width: 70px;
    font-size: 0.75rem;
    padding: 0.2rem 0.35rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 4px;
    font-family: inherit;
}
.admin-capital-input:focus { outline: none; border-color: var(--accent); }



/* Status Tab */
.status-summary-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    min-width: 150px;
    flex: 1;
}
.status-summary-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}
.status-summary-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}
