/* Modern Trading Dashboard Styles */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --dark-color: #212529;
    --light-bg: #f8f9fa;
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --card-shadow-hover: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--light-bg);
    margin-bottom: 60px;
}

/* Navbar */
.navbar {
    box-shadow: var(--card-shadow);
}

.navbar-brand {
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease-in-out;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Cards */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
    padding: 0.75rem 1rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom-width: 1px;
    padding: 0.75rem;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover > tbody > tr:hover > * {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Stat cards */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
}

/* Form controls */
.form-control, .form-select {
    border-radius: 0.375rem;
    border-color: #dee2e6;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* Page headers */
h1 {
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

h5 {
    font-weight: 600;
    font-size: 1rem;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.65em;
}

/* Text utilities */
.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

/* Table row colors for R-multiple */
.table-success {
    --bs-table-bg: rgba(25, 135, 84, 0.1);
}

.table-warning {
    --bs-table-bg: rgba(255, 193, 7, 0.15);
}

.table-danger {
    --bs-table-bg: rgba(220, 53, 69, 0.1);
}

/* Footer */
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: #fff;
}

/* Dropdown filters */
.filter-bar {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
}

/* Charts container */
.chart-container {
    position: relative;
    height: 300px;
}

/* Login partial styling */
.nav-link.btn {
    margin-left: 0.5rem;
}

/* Responsive table wrapper */
.table-responsive {
    border-radius: 0.5rem;
    background-color: #fff;
    box-shadow: var(--card-shadow);
}

/* Animation for loading states */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
