/* ICT Helpdesk Dashboard Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --sidebar-width: 220px;
    --sidebar-collapsed-width: 60px;
    --header-height: 50px;
    --sidebar-bg: #1e3a5f;
    --sidebar-bg-dark: #0d1f33;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f4f6f9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* Remove list styles globally for nav */
ul, ol {
    list-style: none;
}

/* Login Container */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-header i {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}

.login-header h4 {
    margin: 10px 0 5px;
    font-weight: 600;
}

.login-header p {
    opacity: 0.9;
    margin: 0;
}

.login-body {
    padding: 30px;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-dark) 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 50px;
}

.sidebar-header i {
    font-size: 1.5rem;
    color: #4dabf7;
}

.sidebar-header span {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-header span {
    display: none;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: hidden;
    padding: 8px 0;
}

.sidebar-nav ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sidebar-nav li {
    list-style: none !important;
    list-style-type: none !important;
    margin: 1px 8px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.85rem;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-nav .nav-link.active {
    background: var(--primary-color);
    color: white;
}

.sidebar-nav .nav-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav .nav-link span {
    white-space: nowrap;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 15px !important;
}

.nav-section {
    padding: 6px 20px !important;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    margin: 0 !important;
}

.sidebar.collapsed .nav-section {
    display: none;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.user-avatar i {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar.collapsed .user-details {
    display: none;
}

.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.btn-logout:hover {
    background: rgba(220, 53, 69, 0.4);
    color: white;
}

.sidebar.collapsed .btn-logout span {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f4f6f9;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sidebar-toggle {
    font-size: 1.5rem;
    color: var(--secondary-color);
    padding: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.sidebar-toggle:hover {
    color: var(--primary-color);
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.header-actions {
    margin-left: auto;
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.content-section {
    animation: fadeIn 0.3s ease;
}

/* Stat Cards */
.stat-card {
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    background: white;
}

.card-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
    font-weight: 600;
    border-radius: 12px 12px 0 0 !important;
}

.card-body {
    padding: 20px;
}

.card-footer {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
    border-radius: 0 0 12px 12px !important;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: #495057;
    border-top: none;
    padding: 12px 15px;
    background: #f8f9fa;
}

.table td {
    vertical-align: middle;
    padding: 12px 15px;
}

.table-hover tbody tr {
    cursor: pointer;
}

.table-hover tbody tr:hover {
    background-color: #f1f3f5;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
    border-radius: 6px;
}

/* Report Cards */
.report-card {
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.report-card i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.report-card h5 {
    margin-bottom: 5px;
}

/* Chart Container */
.chart-container {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Comments */
.comment-item {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
}

.comment-item.internal {
    background-color: #fff3cd;
    border-left-color: var(--warning-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* Ticket Info */
.ticket-info dt {
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.ticket-info dd {
    font-weight: 500;
    margin-bottom: 15px;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 8px 16px;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    padding: 10px 15px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 12px;
}

.modal-header {
    border-radius: 12px 12px 0 0;
}

/* Toast */
.toast {
    border-radius: 10px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--secondary-color);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.5;
    display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .content-wrapper {
        padding: 15px;
    }
    
    .header-title {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .login-card {
        margin: 10px;
    }
    
    .login-header {
        padding: 20px;
    }
    
    .login-body {
        padding: 20px;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
}

/* Print Styles */
@media print {
    .sidebar, .top-header, .btn, .modal, .toast-container {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Progress Timeline */
.progress-timeline {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.progress-timeline h6 {
    margin-bottom: 20px;
    color: #495057;
}

.timeline-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 30px;
    right: 30px;
    height: 3px;
    background: #dee2e6;
    z-index: 0;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 100px;
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dee2e6;
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.timeline-step.completed .timeline-icon {
    background: var(--success-color);
    color: white;
}

.timeline-step.pending .timeline-icon {
    background: #e9ecef;
    color: #adb5bd;
}

.timeline-content {
    text-align: center;
}

.timeline-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    display: block;
}

.timeline-step.pending .timeline-title {
    color: #adb5bd;
}

.timeline-date {
    font-size: 0.65rem;
    color: #6c757d;
    display: block;
    margin-top: 2px;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline-container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
    }
    
    .timeline-container::before {
        top: 0;
        bottom: 0;
        left: 20px;
        right: auto;
        width: 3px;
        height: auto;
    }
    
    .timeline-step {
        flex-direction: row;
        max-width: none;
        margin-bottom: 15px;
        width: 100%;
    }
    
    .timeline-icon {
        margin-bottom: 0;
        margin-right: 15px;
        flex-shrink: 0;
    }
    
    .timeline-content {
        text-align: left;
    }
}
