/* Custom Styles for Trading Journal */

body {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.screen {
    min-height: 100vh;
}

/* Auth Screen */
.auth-container {
    padding-top: 100px;
}

.auth-card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Stat Cards */
.stat-card {
    border-left: 4px solid #0d6efd;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.stat-card .card-title {
    color: #0d6efd;
    font-weight: bold;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
}

.nav-link {
    cursor: pointer;
}

.nav-link.active {
    font-weight: bold;
}

/* Tab Content */
.tab-content {
    animation: fadeIn 0.3s ease-in;
}

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

/* Tables */
.table th {
    background-color: #343a40;
    color: white;
    font-weight: 500;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Forms */
.form-label {
    font-weight: 500;
    color: #495057;
}

/* Buttons */
.btn {
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Toast Notifications */
.toast {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 500;
}

/* Outcome Badges */
.badge-win {
    background-color: #198754;
}

.badge-partial-win {
    background-color: #20c997;
}

.badge-loss {
    background-color: #dc3545;
}

.badge-partial-loss {
    background-color: #fd7e14;
}

.badge-break-even {
    background-color: #ffc107;
    color: #000;
}

/* Order Type Badges */
.badge-long {
    background-color: #0d6efd;
}

.badge-short {
    background-color: #6f42c1;
}

.badge-stop {
    background-color: #d63384;
}

.badge-limit {
    background-color: #0dcaf0;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        padding-top: 50px;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    #auth-screen,
    #settings-tab,
    #accounts-tab,
    .pagination,
    .filter-section {
        display: none !important;
    }
    
    body {
        background-color: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .tab-content {
        display: block !important;
    }
}

/* Utility Classes */
.text-success-custom {
    color: #198754 !important;
}

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

.text-warning-custom {
    color: #ffc107 !important;
}

/* Checkbox Groups */
.btn-check:checked + .btn {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* Date Input */
input[type="date"],
input[type="datetime-local"] {
    cursor: pointer;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Action Buttons */
.action-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Modal */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Progress Bar */
.progress {
    height: 0.5rem;
}

/* Account Selector */
.account-selector {
    max-width: 200px;
}

/* User Display */
.user-display {
    font-size: 0.875rem;
}

/* Trade Form */
.trade-form-section {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* Summary Table */
.summary-table {
    font-size: 0.875rem;
}

.summary-table th {
    background-color: #343a40;
    color: white;
    font-weight: 500;
}

.summary-table td {
    vertical-align: middle;
}

/* Recent Trades */
.recent-trades-table {
    font-size: 0.875rem;
}

/* Dashboard Stats */
.dashboard-stat {
    text-align: center;
    padding: 1.5rem;
}

.dashboard-stat .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #0d6efd;
}

.dashboard-stat .stat-label {
    color: #6c757d;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter Section */
.filter-section {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* Trade List */
.trade-list-item {
    transition: background-color 0.2s;
}

.trade-list-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Account List */
.account-list-item {
    transition: background-color 0.2s;
}

.account-list-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Settings Section */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section h5 {
    margin-bottom: 1rem;
    color: #343a40;
}

/* Data Management */
.data-management-section {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* User Management */
.user-management-section {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* App Settings */
.app-settings-section {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.375rem;
}

/* Confirmation Modal */
.confirmation-modal .modal-body {
    padding: 2rem;
    text-align: center;
}

.confirmation-modal .modal-body i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

/* Success Toast */
.toast-success {
    background-color: #198754;
    color: white;
}

/* Error Toast */
.toast-error {
    background-color: #dc3545;
    color: white;
}

/* Warning Toast */
.toast-warning {
    background-color: #ffc107;
    color: #000;
}

/* Info Toast */
.toast-info {
    background-color: #0dcaf0;
    color: #000;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-responsive {
        border: 0;
    }
    
    .table thead {
        display: none;
    }
    
    .table tr {
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        display: block;
    }
    
    .table td {
        display: block;
        text-align: right;
        border: none;
        padding: 0.5rem;
    }
    
    .table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: #6c757d;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #212529;
        color: #f8f9fa;
    }
    
    .card {
        background-color: #343a40;
        border-color: #495057;
    }
    
    .table {
        color: #f8f9fa;
    }
    
    .table th {
        background-color: #495057;
    }
    
    .form-control,
    .form-select {
        background-color: #495057;
        border-color: #6c757d;
        color: #f8f9fa;
    }
    
    .form-control:focus,
    .form-select:focus {
        background-color: #495057;
        border-color: #0d6efd;
        color: #f8f9fa;
    }
}