/* assets/css/dashboard.css - Dashboard styles */

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--deep-blue), var(--sky-blue));
    color: var(--white);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--white);
    padding: 5px;
}

.logo h3 {
    margin: 0;
    font-size: 1.1rem;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border-left: 3px solid var(--cyan);
}

.nav-item i {
    width: 20px;
    font-size: 1.1rem;
}

.nav-item.logout {
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 20px;
}

/* Top Bar */
.top-bar {
    background: var(--white);
    border-radius: 12px;
    padding: 15px 25px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.page-title h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--deep-blue);
}

.page-title p {
    margin: 5px 0 0;
    font-size: 0.875rem;
    color: #6B7280;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.notification-icon {
    font-size: 1.25rem;
    color: var(--dark-text);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--deep-blue), var(--sky-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
}

.user-name {
    font-weight: 500;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-info h3 {
    font-size: 0.875rem;
    color: #6B7280;
    margin: 0 0 5px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--deep-blue);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(9, 146, 194, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 1.5rem;
    color: var(--sky-blue);
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-card h3 {
    margin: 0 0 15px;
    font-size: 1rem;
    color: var(--dark-text);
}

canvas {
    max-height: 300px;
}

/* Recent Applications */
.recent-applications {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recent-applications h3 {
    margin: 0 0 15px;
    font-size: 1rem;
}

.applications-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background: var(--light-gray);
    font-weight: 600;
    color: var(--dark-text);
}

table tr:hover {
    background: var(--light-gray);
}

/* Status Badges (Dashboard specific) */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-draft { background: #FEF3C7; color: #92400E; }
.status-submitted { background: #DBEAFE; color: #1E40AF; }
.status-received { background: #E0E7FF; color: #3730A3; }
.status-under_review { background: #FEF3C7; color: #92400E; }
.status-shortlisted { background: #D1FAE5; color: #065F46; }
.status-interview_scheduled { background: #EDE9FE; color: #5B21B6; }
.status-selected { background: #A7F3D0; color: #064E3B; }
.status-rejected { background: #FEE2E2; color: #991B1B; }
.status-appointed { background: #A7F3D0; color: #064E3B; }
.status-completed { background: #D1D5DB; color: #1F2937; }

/* Tables */
.table-container {
    overflow-x: auto;
    background: var(--white);
    border-radius: 12px;
    padding: 0;
}

.data-table {
    width: 100%;
}

.data-table th {
    padding: 15px;
    background: var(--light-gray);
    font-weight: 600;
}

.data-table td {
    padding: 12px 15px;
    vertical-align: middle;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 5px 10px;
    border-radius: 4px;
    background: var(--light-gray);
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

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

.action-btn.view { color: var(--info); }
.action-btn.edit { color: var(--warning); }
.action-btn.delete { color: var(--danger); }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--dark-text);
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .active {
    background: var(--sky-blue);
    border-color: var(--sky-blue);
    color: var(--white);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6B7280;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1100;
}

.toast {
    background: var(--white);
    border-radius: 8px;
    padding: 15px 20px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info { border-left: 4px solid var(--info); }

.toast i { font-size: 1.25rem; }
.toast-success i { color: var(--success); }
.toast-error i { color: var(--danger); }

.toast-content { flex: 1; }
.toast-title { font-weight: 600; margin-bottom: 2px; }
.toast-message { font-size: 0.875rem; color: #6B7280; }

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Dashboard */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}