/* Sabu Foods Trading - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --sidebar-width: 260px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    padding-top: 56px;
}

/* Sidebar Styles */
.sidebar {
    background-color: white;
    border-right: 1px solid #e9ecef;
}

.sidebar .nav-link {
    color: #333;
    padding: 12px 20px;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar-heading {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Main Content */
.main-content {
    margin-left: 0;
    padding: 20px;
    min-height: calc(100vh - 56px);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

/* Stats Cards */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.stat-card.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card.success {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.stat-card.warning {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.stat-card.danger {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Tables */
.table {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

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

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    border: none;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.75rem 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: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5em 0.75em;
    border-radius: 6px;
}

/* Status badges */
.status-paid { background-color: var(--success-color); }
.status-unpaid { background-color: var(--danger-color); }
.status-partially-paid { background-color: var(--warning-color); color: #000; }
.status-pending { background-color: var(--warning-color); color: #000; }
.status-in-transit { background-color: var(--info-color); color: #000; }
.status-delivered { background-color: var(--success-color); }
.status-cancelled { background-color: var(--secondary-color); }
.status-approved { background-color: var(--success-color); }
.status-rejected { background-color: var(--danger-color); }

/* Charts */
.chart-container {
    position: relative;
    height: 400px;
    margin: 1rem 0;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        top: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
}

@media (min-width: 992px) {
    .sidebar {
        position: fixed;
        top: 56px;
        bottom: 0;
        left: 0;
        z-index: 100;
        padding: 0;
        box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
        width: var(--sidebar-width);
        overflow-y: auto;
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
        padding: 20px;
        min-height: calc(100vh - 56px);
    }
}
    
    .stat-card {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        border-radius: 10px;
    }
}

/* Login Page Styles */
.login-page {
    padding-top: 0 !important;
    margin: 0;
    padding: 0;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-body {
    padding: 2rem;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* File upload styles */
.file-upload-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.file-upload-input {
    position: absolute;
    left: -9999px;
}

.file-upload-label {
    display: block;
    padding: 0.75rem 1rem;
    border: 2px dashed #ced4da;
    border-radius: 8px;
    background-color: #f8f9fa;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background-color: #e7f3ff;
}

.file-upload-label.has-file {
    border-color: var(--success-color);
    background-color: #d1e7dd;
    color: var(--success-color);
}

/* Upload progress styles */
.upload-progress {
    margin-top: 10px;
}

.upload-progress .progress {
    height: 6px;
    border-radius: 4px;
}

.upload-loading {
    color: var(--info-color);
    font-weight: 500;
}

.upload-status {
    font-size: 0.875rem;
    margin-top: 5px;
}

.upload-status.text-success {
    color: var(--success-color) !important;
    font-weight: 500;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

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

.sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
