/* ===== (C) style.css — Copy Trading Dashboard Dark Theme ===== */

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2128;
    --bg-hover: #252c35;
    --border: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent: #58a6ff;
    --green: #3fb950;
    --green-bg: rgba(63, 185, 80, 0.1);
    --red: #f85149;
    --red-bg: rgba(248, 81, 73, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== Navbar ===== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all 0.15s;
}

.nav-links a:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-links a.active { color: var(--text-primary); background: var(--bg-card); }

.nav-logout { display: inline; }
.nav-logout button {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
}
.nav-logout button:hover {
    color: var(--red);
    border-color: var(--red);
}

/* ===== Container ===== */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* ===== Auth Pages ===== */
.auth-container {
    max-width: 400px;
    margin: 80px auto;
    text-align: center;
}

.auth-container h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s;
}

.form-group input:focus { border-color: var(--accent); }

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.alert.error {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.15s;
}

.btn-primary {
    width: 100%;
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-hover); }

/* ===== Hero Section (Kunden-Performance) ===== */
.hero-section {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
}

.hero-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.hero-section h1 {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-refresh {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.btn-refresh:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.hero-pnl {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.pnl-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.pnl-value {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero-pnl.positive .pnl-value { color: var(--green); }
.hero-pnl.negative .pnl-value { color: var(--red); }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-value.wins { color: var(--green); }
.stat-value.losses { color: var(--red); }

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Sections ===== */
.section {
    margin-bottom: 32px;
}

.section h2 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--bg-hover);
    border-radius: 99px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Tables ===== */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead {
    background: var(--bg-secondary);
}

th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

tr:last-child td { border-bottom: none; }
tr:hover { background: var(--bg-hover); }

td.symbol { font-weight: 600; }
td.date { color: var(--text-secondary); font-size: 0.85rem; }

.long { color: var(--green); font-weight: 600; }
.short { color: var(--red); font-weight: 600; }
.positive { color: var(--green); font-weight: 600; }
.negative { color: var(--red); font-weight: 600; }

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.link-more {
    display: inline-block;
    margin-top: 12px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}
.link-more:hover { text-decoration: underline; }

/* ===== Bot Performance (Secondary) ===== */
.bot-performance {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.bot-performance h2 {
    margin-bottom: 8px;
}

.bot-since {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.bot-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.bot-stat {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.bot-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.bot-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== History Page ===== */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.history-header h1 { font-size: 1.4rem; }

.history-pnl {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius);
}
.history-pnl.positive { background: var(--green-bg); color: var(--green); }
.history-pnl.negative { background: var(--red-bg); color: var(--red); }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

.page-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .hero-stats, .bot-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .pnl-value { font-size: 2.2rem; }
    .hero-section { padding: 24px 16px; }
    .history-header { flex-direction: column; gap: 8px; align-items: flex-start; }
    .container { padding: 16px 12px; }
}
