/* Complain Track Styles - PSU FMS Theme */

/* Content Box */
.content-box {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
}

/* Search Box */
.search-box {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 100%);
    border: 2px solid #89287f;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(137, 40, 127, 0.15);
}

.search-header {
    background: linear-gradient(135deg, #89287f 0%, #9B4A9D 100%);
    color: #fff;
    padding: 15px 25px;
    font-size: 1.2rem;
    font-weight: 600;
}

.search-header i {
    margin-right: 10px;
}

.search-body {
    padding: 25px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
    font-size: 1rem;
}

/* Form Controls */
.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    border-color: #89287f;
    box-shadow: 0 0 0 0.2rem rgba(137, 40, 127, 0.25);
    outline: none;
}

.form-control::placeholder {
    color: #aaa;
}

/* Text Danger */
.text-danger {
    color: #dc3545 !important;
    font-weight: bold;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #89287f 0%, #9B4A9D 100%);
    border: none;
    padding: 14px 45px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(137, 40, 127, 0.3);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(137, 40, 127, 0.4);
    background: linear-gradient(135deg, #9B4A9D 0%, #89287f 100%);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-outline-primary {
    border: 2px solid #89287f;
    color: #89287f;
    background: transparent;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #89287f;
    color: white;
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
    border-radius: 5px;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
}

/* reCAPTCHA */
.g-recaptcha {
    display: inline-block;
    margin: 10px 0;
}

/* No Result Box */
.no-result-box {
    text-align: center;
    padding: 50px 30px;
    background: #f8f9fa;
    border-radius: 15px;
    color: #6c757d;
}

.no-result-box i {
    color: #dee2e6;
}

.no-result-box h5 {
    color: #495057;
    margin-top: 15px;
}

/* Result Header */
.result-header {
    background: linear-gradient(135deg, #89287f 0%, #9B4A9D 100%);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

.result-header i {
    margin-right: 10px;
}

/* Complain Card */
.complain-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.complain-card:hover {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.12);
}

/* Complain Card Header */
.complain-card-header {
    background: #333;
    color: #fff;
    padding: 15px 25px;
    text-align: center;
}

.complain-id {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Date Info */
.complain-date-info {
    display: flex;
    justify-content: space-between;
    padding: 15px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.date-item {
    color: #555;
    font-size: 0.95rem;
}

.date-item span {
    font-weight: 500;
}

/* Timeline Container */
.timeline-container {
    padding: 40px 25px;
}

/* Timeline */
.timeline {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    flex-wrap: wrap;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-width: 120px;
    max-width: 180px;
    flex: 1;
}

/* Timeline Icon */
.timeline-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #999;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-step.completed .timeline-icon {
    background: linear-gradient(135deg, #89287f 0%, #9B4A9D 100%);
    color: #fff;
}

.timeline-step.current .timeline-icon {
    background: linear-gradient(135deg, #89287f 0%, #9B4A9D 100%);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(137, 40, 127, 0.3);
}

.timeline-step.rejected .timeline-icon {
    background: #6c757d;
    color: #fff;
}

/* Timeline Label */
.timeline-label {
    margin-top: 15px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    max-width: 150px;
    line-height: 1.4;
}

.timeline-step.completed .timeline-label {
    color: #89287f;
    font-weight: 600;
}

.timeline-step.rejected .timeline-label {
    color: #6c757d;
    font-weight: 600;
}

/* Timeline Line */
.timeline-line {
    position: absolute;
    top: 30px;
    left: calc(50% + 30px);
    width: calc(100% - 60px);
    height: 3px;
    background: #e0e0e0;
    z-index: 1;
}

.timeline-line.completed {
    background: linear-gradient(90deg, #89287f 0%, #9B4A9D 100%);
}

/* Complain Details */
.complain-details {
    padding: 20px 25px;
    background: #fafafa;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h6 {
    color: #89287f;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #89287f;
}

.detail-section h6 i {
    margin-right: 8px;
}

/* Table */
.table {
    background: #fff;
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #89287f;
    border-color: #dee2e6;
    white-space: nowrap;
}

.table td {
    border-color: #dee2e6;
}

/* History List */
.history-list {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.history-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    min-width: 150px;
    color: #888;
    font-size: 0.9rem;
}

.history-content {
    flex: 1;
}

.history-content .badge {
    margin-bottom: 8px;
}

/* Badge */
.badge {
    font-weight: 500;
    font-size: 0.85rem;
    padding: 5px 12px;
    border-radius: 20px;
}

.badge-info {
    background: linear-gradient(135deg, #89287f 0%, #9B4A9D 100%);
    color: #fff;
}

.badge-warning {
    background-color: #ffc107;
    color: #000;
}

.badge-success {
    background-color: #28a745;
    color: #fff;
}

.badge-danger {
    background-color: #dc3545;
    color: #fff;
}

/* Alert */
.alert-danger {
    border-radius: 10px;
    border-left: 4px solid #dc3545;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-box {
    animation: fadeInUp 0.4s ease-out;
}

.complain-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Toggle Details Button */
.toggle-details {
    border-radius: 20px;
    padding: 8px 20px;
}

.toggle-details i {
    margin-right: 5px;
    transition: transform 0.3s ease;
}

.toggle-details.active i {
    transform: rotate(180deg);
}

/* Responsive */
@media (max-width: 768px) {
    .content-box {
        padding: 20px;
    }
    
    .search-body {
        padding: 20px;
    }
    
    .complain-date-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .date-item.text-right {
        text-align: left !important;
    }
    
    .timeline {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 30px;
    }
    
    .timeline-step {
        flex-direction: row;
        align-items: center;
        margin-bottom: 30px;
        min-width: auto;
        max-width: none;
        width: 100%;
    }
    
    .timeline-step:last-child {
        margin-bottom: 0;
    }
    
    .timeline-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        flex-shrink: 0;
    }
    
    .timeline-label {
        margin-top: 0;
        margin-left: 15px;
        text-align: left;
        max-width: none;
    }
    
    .timeline-line {
        top: 50px;
        left: 25px;
        width: 3px;
        height: calc(100% + 30px);
    }
    
    .history-item {
        flex-direction: column;
    }
    
    .history-date {
        margin-bottom: 8px;
    }
    
    .btn-primary {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .search-header {
        font-size: 1rem;
        padding: 12px 15px;
    }
    
    .complain-card-header {
        padding: 12px 15px;
    }
    
    .complain-id {
        font-size: 1rem;
    }
    
    .timeline-container {
        padding: 30px 15px;
    }
}

/* Print Styles */
@media print {
    .search-box,
    .g-recaptcha,
    .toggle-details {
        display: none !important;
    }
    
    .complain-details {
        display: block !important;
    }
}