/* static/css/custom_dashboard.css */
/* Professional Dashboard Styling for Pipsla Markets */

/* ============================================
   BASE CARD STYLING
   ============================================ */
.card {
    border: none;
    border-radius: 0.75rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    position: relative;
    z-index: 1;
    background: #ffffff;
    overflow: hidden;
}

.card.shadow-sm {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.075) !important;
}

/* Card Hover Effect */
.card-lift-hover:hover,
.card.shadow-sm:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12) !important;
    z-index: 10;
}

/* Card Header Styling */
.card-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid #e9ecef;
    padding: 0.875rem 1rem;
}

.card-header.bg-white {
    background: #ffffff !important;
}

.card-header .card-title {
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: -0.01em;
}

.card-header .card-title i {
    color: #6c757d;
}

/* ============================================
   CHART CONTAINERS
   ============================================ */
.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

.line-chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.placeholder-center-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    color: #adb5bd;
    font-size: 0.875rem;
}

/* ============================================
   LIST ITEMS & PERFORMERS
   ============================================ */
.mover-list-item {
    padding: 0.625rem 0;
    border-bottom: 1px solid #f1f3f5;
    transition: background-color 0.15s ease;
}

.mover-list-item:last-child {
    border-bottom: none;
}

.mover-list-item:hover {
    background-color: #f8f9fa;
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: 0.375rem;
}

/* ============================================
   FILTER & CONTROLS
   ============================================ */
.filter-badge {
    font-size: 0.8em;
    padding: 0.25em 0.5em;
    border-radius: 0.375rem;
}

.border-subtle {
    border-color: #e9ecef !important;
}

.controls-container {
    position: relative;
    z-index: 20;
}

.controls-container .dropdown-menu {
    z-index: 21;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ============================================
   SCROLLABLE CONTAINERS
   ============================================ */
.open-trades-card-body,
.scrollable-card-body {
    max-height: 260px;
    overflow-y: auto;
    overflow-x: auto;
    padding: 0.5rem;
}

/* Custom Scrollbar Styling */
.open-trades-card-body::-webkit-scrollbar,
.scrollable-card-body::-webkit-scrollbar,
.calendar-card-body::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.open-trades-card-body::-webkit-scrollbar-track,
.scrollable-card-body::-webkit-scrollbar-track,
.calendar-card-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.open-trades-card-body::-webkit-scrollbar-thumb,
.scrollable-card-body::-webkit-scrollbar-thumb,
.calendar-card-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ced4da 0%, #adb5bd 100%);
    border-radius: 3px;
}

.open-trades-card-body::-webkit-scrollbar-thumb:hover,
.scrollable-card-body::-webkit-scrollbar-thumb:hover,
.calendar-card-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #adb5bd 0%, #6c757d 100%);
}

/* ============================================
   TABLES
   ============================================ */
.table {
    margin-bottom: 0;
}

.table thead th {
    font-weight: 600;
    color: #495057;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.04);
}

.table td {
    vertical-align: middle;
    font-size: 0.85rem;
    color: #495057;
}

/* ============================================
   BADGES & STATUS INDICATORS
   ============================================ */
.badge {
    font-weight: 500;
    letter-spacing: 0.025em;
}

.badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
    color: #212529;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-warning {
    color: #ffc107 !important;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.fw-medium {
    font-weight: 500 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

/* ============================================
   BUTTON ENHANCEMENTS
   ============================================ */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0a58ca 0%, #084298 100%);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-color: #ced4da;
}

.btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

/* ============================================
   FORM CONTROLS
   ============================================ */
.form-select,
.form-control {
    border-radius: 0.5rem;
    border-color: #ced4da;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-select:focus,
.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ============================================
   ANIMATION UTILITIES
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 991.98px) {
    .card-header {
        padding: 0.75rem;
    }

    .chart-container {
        height: 220px;
    }

    .table td,
    .table th {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 575.98px) {
    .card {
        border-radius: 0.5rem;
    }

    .card-header .card-title {
        font-size: 0.9rem;
    }

    .chart-container {
        height: 200px;
    }
}

/* ============================================
   DARK MODE PREPARATION (Future)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}
