/**
 * style.css - Custom Styles
 * Buy and Sell Coins Production System
 */

/* =====================================================
   GLOBAL STYLES
   ===================================================== */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
    color: #333;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
    border-radius: var(--border-radius);
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.25rem 1rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #000;
}

/* =====================================================
   CARDS
   ===================================================== */

.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--box-shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-footer {
    background-color: white;
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
}

/* =====================================================
   FORMS
   ===================================================== */

.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.input-group-text {
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
}

/* =====================================================
   TABLES
   ===================================================== */

.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    border-top: none;
}

.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* =====================================================
   ALERTS
   ===================================================== */

.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.25rem;
}

.alert-dismissible .btn-close {
    padding: 1.25rem;
}

/* =====================================================
   BADGES
   ===================================================== */

.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: 0.25rem;
}

/* =====================================================
   NAVIGATION
   ===================================================== */

.navbar {
    box-shadow: var(--box-shadow);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    opacity: 0.8;
}

.nav-link.active {
    font-weight: 600;
}

.dropdown-menu {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    border: none;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* =====================================================
   FOOTER
   ===================================================== */

footer {
    margin-top: auto;
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* =====================================================
   DASHBOARD CARDS
   ===================================================== */

.stat-card {
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(13, 110, 253, 0.1);
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0;
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* =====================================================
   SESSION CARDS
   ===================================================== */

.session-card {
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.session-card.morning {
    border-left-color: #ffc107;
}

.session-card.evening {
    border-left-color: #0d6efd;
}

.session-card.active {
    background-color: #e7f3ff;
}

.session-status {
    font-size: 0.875rem;
    font-weight: 500;
}

/* =====================================================
   COUNTDOWN TIMER
   ===================================================== */

.countdown {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
}

.countdown-warning {
    color: #dc3545;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* =====================================================
   PROGRESS BARS
   ===================================================== */

.progress {
    height: 0.5rem;
    border-radius: 1rem;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 1rem;
    transition: width 0.5s ease;
}

/* =====================================================
   MODALS
   ===================================================== */

.modal-content {
    border-radius: var(--border-radius);
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* =====================================================
   RESPONSIVE UTILITIES
   ===================================================== */

@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.3rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        margin: 0.25rem;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */

@media print {
    .navbar, .btn, footer, .no-print {
        display: none !important;
    }
    
    body {
        background-color: white;
        padding: 0;
        margin: 0;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* =====================================================
   CUSTOM SCROLLBAR
   ===================================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* =====================================================
   LOADING SPINNER
   ===================================================== */

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =====================================================
   TOAST NOTIFICATIONS
   ===================================================== */

.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1050;
}

.toast {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rounded-circle-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shadow-hover {
    transition: all 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: var(--box-shadow-lg);
    transform: translateY(-2px);
}