/* 
   Golden Remote Trade Copier v1.1 - Professional Enterprise Design System
   Aesthetic: Deep Blue & Slate, Clean Card Architecture (Dark/Light Mode)
*/

:root {
    --primary: #3b82f6; /* Modern Primary Blue */
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.15);
    --secondary: #64748b;
    
    /* Default Dark Mode */
    --bg-main: #0b0e14;
    --bg-surface: #151921;
    --bg-card: #1c222d;
    --bg-input: rgba(0, 0, 0, 0.25);
    
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    
    --sidebar-width: 260px;
    --header-height: 70px;
    --transition: all 0.2s ease-in-out;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Light Mode Override */
[data-theme="light"] {
    --bg-main: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f8fafc;
    
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --text-primary: #1e293b; /* Replaced with slate-800 for better visibility */
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    padding-top: calc(var(--header-height) + 2rem);
}

.top-header {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--header-height);
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 99;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Sidebar Components */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    text-decoration: none;
    text-transform: uppercase;
}

.sidebar-menu {
    padding: 1.5rem 0.75rem;
    flex: 1;
    overflow-y: auto;
}

.menu-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 0.75rem 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 0.25rem;
    position: relative;
}

.nav-item i:first-child {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    margin-right: 0.75rem;
}

.nav-item::after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 1rem;
    font-size: 0.8rem;
    opacity: 0;
    transition: var(--transition);
}

.nav-item:hover {
    background-color: var(--primary-glow);
    color: var(--primary);
}

.nav-item:hover::after {
    opacity: 0.5;
    right: 0.75rem;
}

.nav-item.active {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.nav-item.active::after {
    opacity: 1;
    color: #fff;
}

/* Header Components */
.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--primary);
}

/* Theme Toggle */
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    background-color: var(--primary-glow);
}

/* Common UI Elements */
.pane, .card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Stats Layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    flex-shrink: 0;
}

.stat-info p {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.stat-info h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Tabs Architecture */
.tabs-header {
    display: flex;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
}

.tab-link {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tab-link:hover {
    color: var(--primary);
}

.tab-link.active {
    color: var(--primary);
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.6rem;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

/* Buttons */
.btn {
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }

.btn-secondary { background: var(--bg-main); color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-input); border-color: var(--border-hover); }

/* Form Elements */
.form-group { margin-bottom: 1.5rem; position: relative; }
.form-label { display: block; font-size: 0.75rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; margin-bottom: 0.5rem; }
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }

/* Password Visibility Toggle - CENTERED */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 10px; /* Offset for label height */
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.password-toggle:hover { color: var(--primary); }

@media (max-width: 1024px) {
    .sidebar { width: 80px; }
    .sidebar-header h2, .nav-text, .menu-label, .sidebar-logo span:last-child { display: none; }
    .main-content { margin-left: 80px; }
    .top-header { left: 80px; }
}
