/* Custom CSS for SIJOSKU Application */

/* Border utilities */
.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.border-left-danger {
    border-left: 0.25rem solid #e74a3b !important;
}

/* Text utilities */
.text-gray-300 {
    color: #dddfeb !important;
}

.text-gray-400 {
    color: #858796 !important;
}

.text-gray-500 {
    color: #6c757d !important;
}

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

.text-gray-700 {
    color: #3a3b45 !important;
}

.text-gray-800 {
    color: #2e2f37 !important;
}

.text-gray-900 {
    color: #17173b !important;
}

/* Font weight utilities */
.font-weight-bold {
    font-weight: 700 !important;
}

.text-xs {
    font-size: 0.7rem;
}

/* Shadow utilities */
.shadow {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

/* Card utilities */
.card-body {
    flex: 1 1 auto;
    min-height: 1px;
    padding: 1.25rem;
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

/* Timeline styles */
.timeline {
    position: relative;
    padding-left: 0;
    list-style: none;
}

.timeline-item {
    position: relative;
    padding-left: 40px;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: -20px;
    width: 2px;
    background-color: #e3e6f0;
}

.timeline-item:last-child:before {
    display: none;
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #e3e6f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Form enhancements */
.form-control:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.btn-primary {
    background-color: #4e73df;
    border-color: #4e73df;
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-success {
    background-color: #1cc88a;
    border-color: #1cc88a;
}

.btn-success:hover {
    background-color: #17a673;
    border-color: #169b6b;
}

.btn-info {
    background-color: #36b9cc;
    border-color: #36b9cc;
}

.btn-info:hover {
    background-color: #2c9faf;
    border-color: #2a96a5;
}

.btn-warning {
    background-color: #f6c23e;
    border-color: #f6c23e;
    color: #3a3b45;
}

.btn-warning:hover {
    background-color: #f4b619;
    border-color: #f4b30b;
    color: #3a3b45;
}

.btn-danger {
    background-color: #e74a3b;
    border-color: #e74a3b;
}

.btn-danger:hover {
    background-color: #e02d1b;
    border-color: #dc3525;
}

.btn-secondary {
    background-color: #858796;
    border-color: #858796;
}

.btn-secondary:hover {
    background-color: #717384;
    border-color: #6b6d7d;
}

/* Table enhancements */
.table th {
    border-top: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: #f8f9fc;
}

.table-bordered {
    border: 1px solid #e3e6f0;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #e3e6f0;
}

/* Badge enhancements */
.badge {
    font-size: 0.75em;
}

.badge-role {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Search enhancements */
.search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e3e6f0;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-result-item {
    padding: 0.75rem;
    border-bottom: 1px solid #e3e6f0;
    cursor: pointer;
}

.search-result-item:hover {
    background-color: #f8f9fc;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Loading states */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.25rem solid #f3f3f3;
    border-top: 0.25rem solid #4e73df;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print styles */
@media print {
    .no-print,
    .sidebar,
    .btn,
    .dropdown,
    .card-header .dropdown,
    .loading-overlay {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }

    .table-responsive {
        overflow: visible !important;
    }
}

/* Responsive utilities */
@media (max-width: 575.98px) {
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .card-body {
        padding: 1rem;
    }

    .table {
        font-size: 0.875rem;
    }
}

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

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

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

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

/* Focus visible for accessibility */
.btn:focus-visible,
.form-control:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid #4e73df;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        background-color: #0066cc;
        border-color: #0066cc;
    }

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

    .card {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .loading-spinner {
        animation: none;
    }

    .btn,
    .card,
    .nav-link {
        transition: none;
    }
}