/* assets/css/style.css */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-container {
    flex: 1;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-header {
    background: white;
    border-bottom: 2px solid #f1f5f9;
    padding: 1rem 1.5rem;
}

/* Statistics Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-card .icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-card .label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Timeline View */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-item .time {
    color: var(--secondary-color);
    font-size: 0.85rem;
}

/* Status Badges */
.badge-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: #f1f5f9;
    cursor: pointer;
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 0.5rem 1.5rem;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* Star Rating */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.5rem;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 2rem;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #f59e0b;
}

/* SLA Warning */
.sla-warning {
    background: #fef2f2;
    border-left: 4px solid var(--danger-color);
    padding: 0.75rem 1rem;
}

.sla-critical {
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    padding: 0.75rem 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .stat-card .number {
        font-size: 1.5rem;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-item::before {
        left: -18px;
        width: 10px;
        height: 10px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Star Rating Styles */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 2.5rem;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.star-rating label:hover {
    transform: scale(1.1);
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #f59e0b;
}

/* Required field indicator */
.required:after {
    content: ' *';
    color: #ef4444;
}

/* Timeline improvements */
.timeline-item .action {
    font-weight: 500;
    color: #1e293b;
}

.timeline-item .time {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Card improvements */
.card-header {
    background: white;
    border-bottom: 2px solid #f1f5f9;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .star-rating label {
        font-size: 2rem;
    }
}

/* Fix for dropdown overlapping issues */
.dropdown-menu {
    z-index: 1050 !important;
    position: absolute !important;
    inset: 0px auto auto 0px !important;
    transform: translate(0px, 38px) !important;
}

.dropdown-menu.show {
    display: block !important;
}

/* Fix for btn-group dropdown */
.btn-group .dropdown-menu {
    position: absolute !important;
    z-index: 1050 !important;
}

/* Ensure dropdown appears above cards */
.card {
    position: relative;
    z-index: 1;
}

.card-body {
    position: relative;
    z-index: 1;
}

/* Fix for overlapping issues in filter section */
#filterForm .dropdown {
    position: relative;
    z-index: 1000;
}

#filterForm .dropdown-menu {
    z-index: 1050 !important;
}

/* Ensure table doesn't overlap dropdown */
.table-responsive {
    position: relative;
    z-index: 1;
}

/* Fix for modal z-index */
.modal {
    z-index: 1060;
}

.modal-backdrop {
    z-index: 1040;
}

/* Alert Animations */
.alert {
    animation: slideDown 0.3s ease-out;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.alert-dismissible {
    padding-right: 4rem;
}

.alert-dismissible .btn-close {
    padding: 1.25rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alert fade out */
.alert.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Success alert */
.alert-success {
    background-color: #f0fdf4;
    border-color: #86efac;
    color: #065f46;
}

/* Danger alert */
.alert-danger {
    background-color: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

/* Info alert */
.alert-info {
    background-color: #eff6ff;
    border-color: #93c5fd;
    color: #1e40af;
}

/* Warning alert */
.alert-warning {
    background-color: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

/* Guest user styles */
.guest-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.guest-info-box {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.guest-info-box .icon {
    color: #f59e0b;
    font-size: 24px;
}

.temp-password {
    background: #f8fafc;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px dashed #94a3b8;
    font-family: monospace;
    font-size: 16px;
    letter-spacing: 1px;
}