/* ApexTrade - Modern Crypto Investment Platform - Main Stylesheet */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --primary-gradient: #0d9488; /* Swapped to flat Electric Teal for minimal action */
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --secondary: #334155; /* Slate Blue text/structure */
    --accent: #10b981; /* Mint Green */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-primary: #0f172a; /* Deep Navy Text */
    --text-secondary: #334155;
    --text-muted: #94a3b8;
    --bg: #f8fafc; /* Minimal off-white background */
    --bg-secondary: #ffffff; /* Pure White card background */
    --bg-card: #ffffff; /* Pure White card background */
    --border: #e2e8f0; /* Crisp Slate Blue tint border */
    --border-light: #f1f5f9;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.06), 0 10px 10px -5px rgba(15, 23, 42, 0.02);
}

[data-theme="dark"] {
    --primary-gradient: #0d9488;
    --primary: #0d9488;
    --primary-dark: #14b8a6;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --bg: #000000; /* True Black dominant background */
    --bg-secondary: #0f172a; /* Charcoal Grey for cards */
    --bg-card: #0f172a;
    --border: #1e293b; /* Deep Navy borders */
    --border-light: #1e293b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

[data-theme="dark"] body {
    background: linear-gradient(180deg, #020617 0%, #0f172a 40%);
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}
h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
h2 {
    font-size: 2rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}
h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}
a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}
a:hover {
    color: var(--primary-dark);
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}
.btn-secondary {
    background: var(--bg);
    color: var(--text-primary);
    border: 2px solid var(--border);
}
.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: #059669;
}
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}
.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    transition: all 0.2s ease;
    font-family: inherit;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}
.form-help {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}
.error-message {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 600;
}
.alert {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}
.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    margin-bottom: 1.75rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
thead {
    background: var(--bg-secondary);
}
th, td {
    padding: 1rem 1.25rem;
    text-align: left;
}
th {
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}
tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.15s ease;
}
tbody tr:last-child {
    border-bottom: none;
}
tbody tr:hover {
    background: var(--bg-secondary);
}
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.stat-card {
    background: var(--bg-card);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}
.stat-value.positive {
    color: var(--success);
}
.stat-value.negative {
    color: var(--danger);
}
.badge {
    display: inline-block;
    padding: 0.4375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
}
.badge-active {
    background: #ecfdf5;
    color: #065f46;
}
.badge-stopped {
    background: #fef2f2;
    color: #991b1b;
}
.badge-pending {
    background: #fef3c7;
    color: #92400e;
}
.positive {
    color: var(--success);
    font-weight: 700;
}
.negative {
    color: var(--danger);
    font-weight: 700;
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}
.page-info {
    color: var(--text-secondary);
    font-weight: 600;
}
.no-data {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
}
.section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
}
.section-header h2 {
    margin-bottom: 0;
}
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.w-full { width: 100%; }
