/**
 * LW-Staff Custom Styles
 */

/* Sidebar Styles */
.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);
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

.sidebar .nav-link.active {
    color: #0d6efd;
    border-left-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

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

/* Main Content */
main {
    margin-top: 0;
}

@media (min-width: 768px) {
    main {
        margin-left: auto;
    }
}

/* Card Improvements */
.card {
    border: none;
    border-radius: 0.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
}

/* Border Left Colors for Stat Cards */
.border-left-primary {
    border-left: 4px solid #0d6efd !important;
}

.border-left-success {
    border-left: 4px solid #198754 !important;
}

.border-left-info {
    border-left: 4px solid #0dcaf0 !important;
}

.border-left-warning {
    border-left: 4px solid #ffc107 !important;
}

.border-left-danger {
    border-left: 4px solid #dc3545 !important;
}

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

/* Badge Styles */
.badge-rank {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* Status Indicators */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-active {
    background-color: #198754;
}

.status-inactive {
    background-color: #dc3545;
}

.status-loa {
    background-color: #ffc107;
}

/* Notification Dropdown */
.notification-dropdown {
    min-width: 300px;
    max-height: 400px;
    overflow-y: auto;
}

/* Duty Status Badge */
#duty-status {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Avatar Styles */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

.avatar-xl {
    width: 96px;
    height: 96px;
}

/* User List Item */
.user-list-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
}

.user-list-item:last-child {
    border-bottom: none;
}

/* Table Improvements */
.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #6c757d;
}

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

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Classroom Live Indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #dc3545;
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.live-indicator::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

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

/* Course Progress */
.course-progress {
    position: relative;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.course-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #0a58ca);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* FTO Phase Indicator */
.phase-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
}

.phase-1 {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.phase-2 {
    background-color: rgba(32, 201, 151, 0.1);
    color: #20c997;
}

.phase-3 {
    background-color: rgba(255, 193, 7, 0.1);
    color: #cc9a00;
}

/* Org Chart Styles */
.org-chart-node {
    text-align: center;
    padding: 1rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    min-width: 150px;
}

.org-chart-node.command {
    border-color: #dc3545;
    border-width: 2px;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        top: 0;
    }

    main {
        padding-top: 0;
    }

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

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }

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

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

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}
