/* Custom styles for Clumber Case Management */

/* Case Stages Timeline Styles */
.case-stages {
    position: relative;
}

.stage-item {
    position: relative;
    z-index: 1;
}

.stage-circle {
    transition: all 0.3s ease;
    border: 2px solid #dee2e6;
}

.stage-item .stage-circle.bg-primary,
.stage-item .stage-circle.bg-success {
    border-color: transparent;
}

.stage-title {
    font-size: 0.9rem;
    line-height: 1.2;
    min-height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stage-description {
    font-size: 0.75rem;
    line-height: 1.3;
    display: block;
    margin-top: 0.25rem;
}

.progress-line {
    transition: background-color 0.3s ease;
}

/* Mini case stages for cards */
.case-stages-mini {
    position: relative;
}

.stage-item-mini {
    flex: 1;
    z-index: 1;
}

.stage-circle-mini {
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    margin: 0 auto;
}

.stage-item-mini .stage-circle-mini.bg-primary,
.stage-item-mini .stage-circle-mini.bg-success {
    border-color: transparent;
}

.progress-line-mini {
    transition: background-color 0.3s ease;
}

/* Clumber Branding */
.text-clumber {
    color: #4CAF50 !important;
}

.bg-clumber {
    background-color: #4CAF50 !important;
}

.btn-clumber {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-clumber:hover {
    background-color: #2E7D32;
    border-color: #2E7D32;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-clumber:focus {
    background-color: #2E7D32;
    border-color: #2E7D32;
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

/* Enhanced Card Styling */
.card.border-0.shadow-sm {
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.border-0.shadow-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.card-header.bg-clumber {
    border-radius: 12px 12px 0 0 !important;
}

/* Progress Bar Styling */
.progress {
    border-radius: 10px;
    background-color: #f1f3f4;
}

.progress-bar.bg-clumber {
    border-radius: 10px;
    background: linear-gradient(45deg, #4CAF50, #66BB6A);
}

/* Responsive adjustments for case stages */
@media (max-width: 768px) {
    .stage-title {
        font-size: 0.8rem;
        min-height: 3rem;
    }
    
    .stage-description {
        font-size: 0.7rem;
    }
    
    .stage-circle {
        width: 40px !important;
        height: 40px !important;
        font-size: 0.9rem;
    }
    
    .progress-line {
        top: 20px !important;
        left: calc(50% + 20px) !important;
        width: calc(100% - 40px) !important;
    }
    
    /* Mini timeline adjustments for mobile */
    .stage-circle-mini {
        width: 20px !important;
        height: 20px !important;
        font-size: 0.6rem !important;
    }
    
    .progress-line-mini {
        top: 10px !important;
        left: 20px !important;
        width: calc(100% - 20px) !important;
        height: 1px !important;
    }
}

:root {
    --primary-color: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
}

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

/* Navigation */
.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Cards */
.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 {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Tables */
.table {
    font-size: 0.9rem;
}

.table th {
    font-weight: 600;
    color: #495057;
    border-top: none;
}

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

/* Badges */
.badge {
    font-weight: 500;
    letter-spacing: 0.25px;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #004494;
    border-color: #004494;
}

/* Forms */
.form-control, .form-select {
    border-radius: 0.375rem;
    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: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
}

.alert-dismissible .btn-close {
    padding: 0.75rem 1rem;
}

/* Login page with forest background */
.login-page {
    background-image: url('../images/homepage-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
}

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

.stats-card .stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Case stage indicators */
.stage-indicator {
    position: relative;
    padding-left: 2rem;
}

.stage-indicator::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: #dee2e6;
}

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

.stage-indicator.current::before {
    background-color: var(--primary-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 86, 179, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 86, 179, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 86, 179, 0);
    }
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-nav .dropdown-menu {
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: transparent;
        border: 0;
        box-shadow: none;
    }
    
    .navbar-nav .dropdown-menu .dropdown-item {
        color: rgba(255, 255, 255, 0.75);
    }
    
    .navbar-nav .dropdown-menu .dropdown-item:hover {
        color: white;
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
}

/* Custom utilities */
.text-break {
    word-break: break-word;
}

.cursor-pointer {
    cursor: pointer;
}

.min-height-400 {
    min-height: 400px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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