/* ========================================
   AUREX TRADE - PROFESSIONAL B&W THEME
   Pure Black & White Design with Poppins Font
   ======================================== */

/* Google Font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ========================================
   CSS VARIABLES - LIGHT THEME (Default)
   ======================================== */
:root {
    /* Light Theme Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #F1F3F5;
    --bg-card: #FFFFFF;
    --bg-hover: #E9ECEF;
    
    /* Text Colors */
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-muted: #6C757D;
    --text-inverse: #FFFFFF;
    
    /* Border Colors */
    --border-color: #DEE2E6;
    --border-light: #E9ECEF;
    --border-dark: #CED4DA;
    
    /* Accent Colors - Pure B&W */
    --accent-primary: #1A1A1A;
    --accent-secondary: #333333;
    --accent-hover: #000000;
    
    /* Status Colors */
    --success: #28A745;
    --danger: #DC3545;
    --warning: #FFC107;
    --info: #17A2B8;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    
    /* Font Family */
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50px;
}

/* ========================================
   DARK THEME VARIABLES
   ======================================== */
body.dark-theme {
    /* Dark Theme Colors */
    --bg-primary: #0D0D0D;
    --bg-secondary: #141414;
    --bg-tertiary: #1A1A1A;
    --bg-card: #1F1F1F;
    --bg-hover: #2A2A2A;
    
    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #E0E0E0;
    --text-muted: #9E9E9E;
    --text-inverse: #1A1A1A;
    
    /* Border Colors */
    --border-color: #2D2D2D;
    --border-light: #333333;
    --border-dark: #404040;
    
    /* Accent Colors - Pure B&W */
    --accent-primary: #FFFFFF;
    --accent-secondary: #E0E0E0;
    --accent-hover: #F5F5F5;
    
    /* Shadows for Dark Theme */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* ========================================
   GLOBAL BASE STYLES
   ======================================== */
/* Don't override font-family on * selector - it breaks Font Awesome icons */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color var(--transition-normal), color var(--transition-normal);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5em;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.75rem; font-weight: 600; }
h4 { font-size: 1.5rem; font-weight: 500; }
h5 { font-size: 1.25rem; font-weight: 500; }
h6 { font-size: 1rem; font-weight: 500; }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
    text-decoration: none;
}

/* ========================================
   THEME TOGGLE BUTTON
   ======================================== */
.theme-toggle {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 9999;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
    background: var(--accent-primary);
    color: var(--text-inverse);
    border-color: var(--accent-primary);
}

.theme-toggle i {
    font-size: 1.2rem;
    transition: transform var(--transition-normal);
}

.theme-toggle:hover i {
    transform: rotate(180deg);
}

/* Mobile position adjustment - move to bottom left to avoid overlap */
@media (max-width: 768px) {
    .theme-toggle {
        top: auto;
        bottom: 85px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

/* ========================================
   CARDS & CONTAINERS
   ======================================== */
.card,
.box,
.panel,
.widget,
.dashboard-card,
.stat-card,
.info-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
    transition: all var(--transition-normal) !important;
}

.card:hover,
.box:hover,
.dashboard-card:hover,
.stat-card:hover {
    box-shadow: var(--shadow-lg) !important;
    transform: translateY(-2px);
}

.card-header,
.box-header,
.panel-header {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1rem 1.25rem;
}

.card-body,
.box-body,
.panel-body {
    background: var(--bg-card) !important;
    padding: 1.25rem;
}

.card-footer,
.box-footer {
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
    padding: 1rem 1.25rem;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    font-family: var(--font-family) !important;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

/* Primary Button - Black/White based on theme */
.btn-primary {
    background: var(--accent-primary) !important;
    color: var(--text-inverse) !important;
    border-color: var(--accent-primary) !important;
}

.btn-primary:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Secondary Button - Outlined */
.btn-secondary,
.btn-outline {
    background: transparent !important;
    color: var(--text-primary) !important;
    border-color: var(--border-dark) !important;
}

.btn-secondary:hover,
.btn-outline:hover {
    background: var(--accent-primary) !important;
    color: var(--text-inverse) !important;
    border-color: var(--accent-primary) !important;
}

/* Light Button */
.btn-light {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.btn-light:hover {
    background: var(--bg-hover) !important;
}

/* Dark Button */
.btn-dark {
    background: #1A1A1A !important;
    color: #FFFFFF !important;
    border-color: #1A1A1A !important;
}

.btn-dark:hover {
    background: #000000 !important;
    border-color: #000000 !important;
}

/* Status Buttons */
.btn-success {
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: #FFFFFF !important;
}

.btn-danger {
    background: var(--danger) !important;
    border-color: var(--danger) !important;
    color: #FFFFFF !important;
}

.btn-warning {
    background: var(--warning) !important;
    border-color: var(--warning) !important;
    color: #1A1A1A !important;
}

.btn-info {
    background: var(--info) !important;
    border-color: var(--info) !important;
    color: #FFFFFF !important;
}

/* ========================================
   FORMS & INPUTS
   ======================================== */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="search"],
textarea,
select {
    font-family: var(--font-family) !important;
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.75rem 1rem !important;
    transition: all var(--transition-fast) !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1) !important;
}

body.dark-theme .form-control:focus,
body.dark-theme .form-select:focus,
body.dark-theme input:focus,
body.dark-theme textarea:focus,
body.dark-theme select:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-muted) !important;
}

.form-label,
label {
    font-family: var(--font-family) !important;
    color: var(--text-primary) !important;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ========================================
   NAVIGATION & HEADER
   ======================================== */
.navbar,
.header,
.top-header,
nav {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
}

.navbar-brand,
.header-title {
    color: var(--text-primary) !important;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    transition: all var(--transition-fast) !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary) !important;
    background: var(--bg-hover) !important;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar,
.side-menu,
.left-sidebar {
    background: var(--bg-card) !important;
    border-right: 1px solid var(--border-color) !important;
}

.sidebar-menu a,
.side-menu a,
.sidebar .nav-link {
    color: var(--text-secondary) !important;
    padding: 0.875rem 1.25rem !important;
    border-radius: var(--radius-md) !important;
    margin: 0.25rem 0.5rem !important;
    transition: all var(--transition-fast) !important;
}

.sidebar-menu a:hover,
.side-menu a:hover,
.sidebar .nav-link:hover,
.sidebar-menu a.active,
.side-menu a.active,
.sidebar .nav-link.active {
    background: var(--accent-primary) !important;
    color: var(--text-inverse) !important;
}

.sidebar-menu a i,
.side-menu a i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* ========================================
   TABLES
   ======================================== */
.table {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

.table th {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color) !important;
    padding: 1rem !important;
}

.table td {
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    border-bottom: 1px solid var(--border-light) !important;
    padding: 0.875rem 1rem !important;
    vertical-align: middle;
}

.table tbody tr:hover td {
    background: var(--bg-hover) !important;
}

.table-striped tbody tr:nth-of-type(odd) td {
    background: var(--bg-secondary) !important;
}

.table-bordered {
    border: 1px solid var(--border-color) !important;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid var(--border-color) !important;
}

/* ========================================
   MODALS
   ======================================== */
.modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-xl) !important;
}

.modal-header {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.modal-title {
    color: var(--text-primary) !important;
    font-weight: 600;
}

.modal-body {
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
}

.modal-footer {
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
}

.modal-backdrop {
    background: #000000 !important;
}

.btn-close {
    filter: var(--text-primary);
}

body.dark-theme .btn-close {
    filter: invert(1);
}

/* ========================================
   DROPDOWNS
   ======================================== */
.dropdown-menu {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0.5rem !important;
}

.dropdown-item {
    color: var(--text-secondary) !important;
    padding: 0.625rem 1rem !important;
    border-radius: var(--radius-sm) !important;
    transition: all var(--transition-fast) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}

.dropdown-divider {
    border-color: var(--border-color) !important;
}

/* ========================================
   BADGES & LABELS
   ======================================== */
.badge {
    font-family: var(--font-family) !important;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
}

.badge-primary,
.bg-primary {
    background: var(--accent-primary) !important;
    color: var(--text-inverse) !important;
}

.badge-secondary,
.bg-secondary {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

.badge-success,
.bg-success {
    background: var(--success) !important;
    color: #FFFFFF !important;
}

.badge-danger,
.bg-danger {
    background: var(--danger) !important;
    color: #FFFFFF !important;
}

.badge-warning,
.bg-warning {
    background: var(--warning) !important;
    color: #1A1A1A !important;
}

.badge-info,
.bg-info {
    background: var(--info) !important;
    color: #FFFFFF !important;
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    border-radius: var(--radius-md) !important;
    border: none !important;
    padding: 1rem 1.25rem !important;
}

.alert-success {
    background: rgba(40, 167, 69, 0.15) !important;
    color: var(--success) !important;
    border-left: 4px solid var(--success) !important;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15) !important;
    color: var(--danger) !important;
    border-left: 4px solid var(--danger) !important;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15) !important;
    color: #856404 !important;
    border-left: 4px solid var(--warning) !important;
}

.alert-info {
    background: rgba(23, 162, 184, 0.15) !important;
    color: var(--info) !important;
    border-left: 4px solid var(--info) !important;
}

/* ========================================
   PROGRESS BARS
   ======================================== */
.progress {
    background: var(--bg-tertiary) !important;
    border-radius: var(--radius-full) !important;
    height: 8px !important;
    overflow: hidden;
}

.progress-bar {
    background: var(--accent-primary) !important;
    border-radius: var(--radius-full) !important;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
    gap: 0.25rem;
}

.page-item .page-link {
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.5rem 0.875rem !important;
    transition: all var(--transition-fast) !important;
}

.page-item .page-link:hover,
.page-item.active .page-link {
    background: var(--accent-primary) !important;
    color: var(--text-inverse) !important;
    border-color: var(--accent-primary) !important;
}

/* ========================================
   TOOLTIPS & POPOVERS
   ======================================== */
.tooltip-inner {
    background: var(--accent-primary) !important;
    color: var(--text-inverse) !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-family) !important;
}

.popover {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
}

.popover-header {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.popover-body {
    color: var(--text-secondary) !important;
}

/* ========================================
   LISTS
   ======================================== */
.list-group {
    border-radius: var(--radius-md) !important;
}

.list-group-item {
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
    padding: 0.875rem 1.25rem !important;
    transition: all var(--transition-fast) !important;
}

.list-group-item:hover {
    background: var(--bg-hover) !important;
}

.list-group-item.active {
    background: var(--accent-primary) !important;
    color: var(--text-inverse) !important;
    border-color: var(--accent-primary) !important;
}

/* ========================================
   TABS
   ======================================== */
.nav-tabs {
    border-bottom: 2px solid var(--border-color) !important;
}

.nav-tabs .nav-link {
    color: var(--text-muted) !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    margin-bottom: -2px;
    padding: 0.75rem 1.25rem !important;
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary) !important;
    border-color: transparent !important;
}

.nav-tabs .nav-link.active {
    color: var(--text-primary) !important;
    background: transparent !important;
    border-bottom-color: var(--accent-primary) !important;
}

.nav-pills .nav-link {
    color: var(--text-secondary) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.625rem 1rem !important;
}

.nav-pills .nav-link.active {
    background: var(--accent-primary) !important;
    color: var(--text-inverse) !important;
}

/* ========================================
   ACCORDION
   ======================================== */
.accordion-item {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
}

.accordion-button {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.accordion-button:focus {
    box-shadow: none !important;
    border-color: var(--border-color) !important;
}

.accordion-body {
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
}

/* ========================================
   BREADCRUMBS
   ======================================== */
.breadcrumb {
    background: var(--bg-secondary) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.75rem 1rem !important;
}

.breadcrumb-item {
    color: var(--text-muted) !important;
}

.breadcrumb-item.active {
    color: var(--text-primary) !important;
}

.breadcrumb-item a {
    color: var(--text-secondary) !important;
}

.breadcrumb-item a:hover {
    color: var(--text-primary) !important;
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================================
   SELECTION STYLING
   ======================================== */
::selection {
    background: var(--accent-primary);
    color: var(--text-inverse);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.bg-theme-primary { background: var(--bg-primary) !important; }
.bg-theme-secondary { background: var(--bg-secondary) !important; }
.bg-theme-card { background: var(--bg-card) !important; }

.text-theme-primary { color: var(--text-primary) !important; }
.text-theme-secondary { color: var(--text-secondary) !important; }
.text-theme-muted { color: var(--text-muted) !important; }

.border-theme { border-color: var(--border-color) !important; }
.shadow-theme { box-shadow: var(--shadow-md) !important; }

/* ========================================
   SPECIFIC COMPONENT OVERRIDES
   ======================================== */

/* Balance Card */
.balance-card,
.wallet-card,
.account-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
}

/* Stats/Dashboard Numbers */
.stat-number,
.balance-amount,
.price-value {
    color: var(--text-primary) !important;
    font-weight: 700;
}

/* Trading Cards */
.trading-card,
.package-card,
.plan-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    transition: all var(--transition-normal) !important;
}

.trading-card:hover,
.package-card:hover,
.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg) !important;
}

/* Price Up/Down Colors - Keep for trading */
.price-up,
.text-success,
.profit {
    color: var(--success) !important;
}

.price-down,
.text-danger,
.loss {
    color: var(--danger) !important;
}

/* Icons */
.icon-circle {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

/* Loading Spinner */
.spinner-border,
.spinner-grow {
    color: var(--accent-primary) !important;
}

/* ========================================
   MOBILE SPECIFIC
   ======================================== */
@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    
    .card {
        border-radius: var(--radius-md) !important;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
    
    .form-control,
    input,
    select,
    textarea {
        padding: 0.625rem 0.875rem !important;
    }
}

/* ========================================
   CHART BUTTONS
   ======================================== */
.chart-btn {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.chart-btn:hover {
    border-color: var(--accent-primary) !important;
    background: var(--bg-hover) !important;
}

.chart-btn.active {
    background: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: var(--text-inverse) !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .theme-toggle {
        display: none !important;
    }
    
    body {
        background: #FFFFFF !important;
        color: #000000 !important;
    }
}
