/* Custom styles for BD Rate System */

/* Improve table responsiveness */
.table-responsive {
    overflow-x: auto;
}

/* Style for profit calculation tables */
.profit-table th {
    background-color: #f4f6f9;
    font-weight: bold;
}

.profit-table td {
    vertical-align: middle;
}

/* Style for positive/negative profit */
.profit-positive {
    color: #28a745 !important;
    font-weight: bold;
}

.profit-negative {
    color: #dc3545 !important;
    font-weight: bold;
}

/* Profit calculation table specific styles */
.price-display, .profit-display {
    text-align: center;
    padding: 8px 4px;
}

.top-price, .top-profit {
    font-weight: bold;
    color: #000;
    margin-bottom: 2px;
    font-size: 1.1em;
}

.bottom-price, .bottom-profit {
    font-weight: bold;
    color: #059669;
    font-size: 0.9em;
}

/* Platform header colors */
.table th[style*="background-color: #ff6b35"] {
    background-color: #ff6b35 !important;
    color: white !important;
}

.table th[style*="background-color: #1e3a8a"] {
    background-color: #1e3a8a !important;
    color: white !important;
}

.table th[style*="background-color: #000000"] {
    background-color: #000000 !important;
    color: white !important;
}

.table th[style*="background-color: #059669"] {
    background-color: #059669 !important;
    color: white !important;
}

/* Table improvements */
.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

.table th {
    text-align: center;
    vertical-align: middle;
    font-weight: 600;
}

.table td {
    text-align: center;
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,.05);
}

/* Improve form styling */
.form-group label {
    font-weight: 600;
    color: #495057;
}

.input-group-text {
    background-color: #e9ecef;
    border-color: #ced4da;
}

/* Card improvements */
.card {
    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
    margin-bottom: 1rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Button improvements */
.btn {
    border-radius: 0.25rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Modal improvements */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Alert improvements */
.alert {
    border-radius: 0.25rem;
    border: 1px solid transparent;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Dashboard improvements */
.small-box {
    border-radius: 0.25rem;
    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
}

.small-box .inner {
    padding: 10px;
}

.small-box .icon {
    color: rgba(0,0,0,.15);
}

/* Sidebar improvements */
.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active {
    background-color: #007bff;
    color: #fff;
}

/* Content improvements */
.content-wrapper {
    background-color: #f4f6f9;
}

.content-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
}

/* Card improvements for profit calculation */
.card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 1.25rem;
}

.card .card-header .card-title {
    margin-bottom: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

/* Form improvements */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.125rem 0.25rem;
        font-size: 0.75rem;
    }
}

/* Login page logo */
.login-logo-img {
    display: block;
    max-width: 120px;
    height: auto;
    margin: 0 auto 10px;
}

/* Sidebar brand logo */
.sidebar .brand-link { /* ensure proper alignment/height */
    display: flex;
    align-items: center;
    min-height: 56px;
}

.brand-logo-img {
    width: 36px !important;
    height: 36px !important;
    object-fit: contain;
    display: inline-block;
    margin: 0 10px 0 10px;
}