/* MPOB Admin Platform Custom Styles */

:root {
    --primary-color: #0066cc;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Layout Improvements */
body {
    background-color: #f5f7fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px; /* Reduced by 2pt from default 14px */
}

/* Navigation Enhancements */
.navbar-brand {
    font-weight: bold;
    font-size: 1.1rem; /* Reduced from 1.25rem */
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Card Enhancements */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

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

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Dashboard Statistics Cards */
.border-left-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-left-info {
    border-left: 4px solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 4px solid var(--warning-color) !important;
}

/* Table Enhancements */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.75rem; /* Reduced from 0.875rem */
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.table-hover tbody tr:hover {
    color: #495057;
    background-color: rgba(0, 0, 0, 0.05);
}

/* Form Enhancements */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

/* Button Enhancements */
.btn {
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn-group-sm > .btn, .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem; /* Reduced from 0.875rem */
}

/* Badge Enhancements */
.badge {
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Status Badge Colors */
.bg-success {
    background-color: var(--success-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
    color: #212529 !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Login Page Styling */
.card-body.p-5 {
    padding: 3rem !important;
}

.fa-seedling {
    color: var(--success-color);
}

/* Error Pages */
.error-page {
    padding: 2rem 0;
}

.error-page .display-1 {
    font-size: 6rem;
    font-weight: 300;
    line-height: 1;
}

.error-actions {
    margin-top: 2rem;
}

/* DataTables Integration */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: #495057;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.375rem 0.75rem;
    margin-left: 0.125rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    color: var(--primary-color) !important;
    background: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color);
}

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

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

/* Breadcrumb Styling */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: var(--bs-breadcrumb-divider, "/");
    color: var(--secondary-color);
}

/* Progress and Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.75rem; /* Reduced from 0.875rem */
    }
    
    .btn-group-sm > .btn, .btn-sm {
        padding: 0.125rem 0.25rem;
        font-size: 0.65rem; /* Reduced from 0.75rem */
    }
    
    .error-page .display-1 {
        font-size: 3.5rem; /* Reduced from 4rem */
    }
}

/* Print Styles */
@media print {
    .btn, .pagination, .navbar, .modal, .alert {
        display: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
    
    .table {
        font-size: 0.75rem;
    }
}

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

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

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

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

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.active {
    background-color: var(--success-color);
}

.status-indicator.inactive {
    background-color: var(--secondary-color);
}

.status-indicator.pending {
    background-color: var(--warning-color);
}

.status-indicator.error {
    background-color: var(--danger-color);
}

/* Utility Classes */
.text-xs {
    font-size: 0.65rem; /* Reduced from 0.75rem */
}

.font-weight-bold {
    font-weight: 700 !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

/* Form Section Styling */
.form-section {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.form-section h5 {
    color: var(--primary-color);
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Footer Styling */
footer {
    margin-top: auto;
}

footer p {
    margin-bottom: 0;
    font-size: 0.75rem; /* Reduced from 0.875rem */
}

/* Global Font Size Adjustments - Reduced by 2pt */
h1 { font-size: 2.2rem; }  /* Reduced from 2.5rem */
h2 { font-size: 1.8rem; }  /* Reduced from 2rem */
h3 { font-size: 1.5rem; }  /* Reduced from 1.75rem */
h4 { font-size: 1.2rem; }  /* Reduced from 1.5rem */
h5 { font-size: 1rem; }    /* Reduced from 1.25rem */
h6 { font-size: 0.9rem; }  /* Reduced from 1rem */

/* Bootstrap Component Font Size Overrides */
.btn { font-size: 0.8rem; }
.form-control, .form-select { font-size: 0.8rem; }
.form-label { font-size: 0.8rem; }
.card-title { font-size: 1rem; }
.card-text { font-size: 0.8rem; }
.badge { font-size: 0.7rem; }
.breadcrumb { font-size: 0.8rem; }
.nav-link { font-size: 0.8rem; }
.dropdown-item { font-size: 0.8rem; }
.table td, .table th { font-size: 0.8rem; }
.modal-title { font-size: 1.1rem; }
.modal-body { font-size: 0.8rem; }
.alert { font-size: 0.8rem; }

/* DataTables Font Size Overrides */
.dataTables_wrapper { font-size: 0.8rem; }
.dataTables_length, .dataTables_filter, .dataTables_info, .dataTables_paginate { font-size: 0.75rem; }
