/* ===== DASHBOARD.CSS - COMPLETE VERSION ===== */

.dashboard-navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 16px;
    background: #f1f5f9;
    border-radius: 50px;
}

.nav-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-uni {
    font-size: 12px;
    color: #64748b;
}

.dashboard-layout {
    background: #f8fafc;
    min-height: calc(100vh - 80px);
    padding: 40px 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

.dashboard-sidebar {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-profile {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-profile img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 16px;
    border: 4px solid white;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.sidebar-profile h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.student-badge {
    color: #06d6a0;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.student-badge i {
    margin-right: 4px;
}

.student-uni {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-outline {
    background: transparent;
    border: 2px solid #4361ee;
    color: #4361ee;
}

.btn-outline:hover {
    background: #4361ee;
    color: white;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 24px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-nav a i {
    width: 20px;
}

.sidebar-nav a .badge {
    background: #ef476f;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    margin-left: auto;
}

.sidebar-nav a:hover {
    background: #f1f5f9;
    color: #1e1e2f;
}

.sidebar-nav a.active {
    background: #4361ee;
    color: white;
}

.sidebar-nav a.active .badge {
    background: white;
    color: #4361ee;
}

.sidebar-help {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.sidebar-help i {
    font-size: 24px;
    color: #4361ee;
}

.sidebar-help h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.sidebar-help p {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.sidebar-help a {
    color: #4361ee;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.dashboard-main {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    padding: 30px;
}

.dashboard-tab {
    display: none;
}

.dashboard-tab.active {
    display: block;
}

.tab-header {
    margin-bottom: 30px;
}

.tab-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.tab-header p {
    color: #64748b;
}

.welcome-banner {
    background: linear-gradient(135deg, #4361ee, #3f37c9);
    border-radius: 12px;
    padding: 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.welcome-text h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.welcome-text p {
    opacity: 0.9;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.2);
    padding: 12px 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.weather-widget i {
    font-size: 32px;
}

.temp {
    font-size: 24px;
    font-weight: 700;
    display: block;
}

.location {
    font-size: 12px;
    opacity: 0.9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border-color: transparent;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 24px;
}

.stat-info h3 {
    font-size: 24px;
    margin-bottom: 4px;
}

.stat-info p {
    color: #64748b;
    font-size: 13px;
}

.quick-actions {
    margin-bottom: 40px;
}

.quick-actions h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.action-card {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #1e1e2f;
    transition: all 0.3s ease;
}

.action-card:hover {
    background: #4361ee;
    color: white;
    transform: translateY(-2px);
}

.action-card i {
    font-size: 28px;
    margin-bottom: 12px;
    color: #4361ee;
}

.action-card:hover i {
    color: white;
}

.action-card h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.action-card p {
    font-size: 12px;
    opacity: 0.8;
}

.dashboard-section {
    margin-bottom: 40px;
}

.dashboard-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-section .section-header h2 {
    font-size: 20px;
}

.dashboard-section .section-header p {
    color: #64748b;
    font-size: 14px;
}

.recent-listings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 12px;
    background: #f1f5f9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.recent-item:hover {
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.recent-item img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
}

.recent-info {
    flex: 1;
}

.recent-info h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.recent-info p {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 4px;
}

.recent-price {
    font-weight: 700;
    color: #4361ee;
}

.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 16px;
    background: #f1f5f9;
    border-radius: 12px;
}

.filter-group {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    font-size: 14px;
    color: #1e1e2f;
    cursor: pointer;
}

.messages-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    min-height: 600px;
}

.conversations-list {
    background: white;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    max-height: 600px;
}

.conversation {
    display: flex;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f1f5f9;
}

.conversation:hover {
    background: #f1f5f9;
}

.conversation.active {
    background: rgba(67, 97, 238, 0.05);
    border-left: 4px solid #4361ee;
}

.conversation img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.conversation-details {
    flex: 1;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.conversation-header h4 {
    font-size: 15px;
}

.time {
    font-size: 11px;
    color: #64748b;
}

.last-message {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.unread-badge {
    background: #4361ee;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
}

.message-view {
    display: flex;
    flex-direction: column;
    height: 600px;
    background: white;
}

.message-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.message-contact {
    display: flex;
    align-items: center;
    gap: 12px;
}

.message-contact img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.message-contact h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.message-contact p {
    font-size: 12px;
    color: #64748b;
}

.message-history {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    max-width: 70%;
}

.message.received {
    align-self: flex-start;
}

.message.sent {
    align-self: flex-end;
}

.message-content {
    background: #f1f5f9;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
}

.message.sent .message-content {
    background: #4361ee;
    color: white;
}

.message-time {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
    display: block;
}

.message.sent .message-time {
    color: rgba(255,255,255,0.7);
}

.message-composer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

.message-composer input {
    flex: 1;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
}

.btn-send {
    padding: 12px 24px;
}

.applications-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.application-stat-card {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #4361ee;
    display: block;
    margin-bottom: 4px;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
}

.applications-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.application-card {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

.application-status {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: rgba(255, 209, 102, 0.2);
    color: #b7791f;
}

.status-approved {
    background: rgba(6, 214, 160, 0.2);
    color: #06d6a0;
}

.status-viewing {
    background: rgba(67, 97, 238, 0.2);
    color: #4361ee;
}

.application-details {
    display: flex;
    gap: 20px;
}

.application-details img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
}

.application-info {
    flex: 1;
}

.application-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.application-info p {
    color: #64748b;
    margin-bottom: 12px;
}

.application-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #64748b;
    flex-wrap: wrap;
}

.profile-settings {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-header-card {
    display: flex;
    gap: 30px;
    padding: 30px;
    background: #f1f5f9;
    border-radius: 12px;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.profile-avatar-section img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.profile-info-section {
    flex: 1;
}

.profile-info-section h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.verification-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.verification-badge.verified {
    background: rgba(6, 214, 160, 0.2);
    color: #06d6a0;
}

.profile-info-section p {
    color: #64748b;
    margin-bottom: 8px;
}

.profile-form {
    padding: 30px;
    background: #f1f5f9;
    border-radius: 12px;
}

.profile-form h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.settings-section {
    padding: 30px;
    background: #f1f5f9;
    border-radius: 12px;
    margin-bottom: 20px;
}

.settings-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.settings-item p {
    color: #64748b;
    font-size: 13px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    transition: 0.3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4361ee;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.danger-zone {
    border: 2px solid rgba(239, 71, 111, 0.3);
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid #ef476f;
    color: #ef476f;
}

.btn-outline-danger:hover {
    background: #ef476f;
    color: white;
}

.btn-danger {
    background: #ef476f;
    color: white;
}

.btn-danger:hover {
    background: #d64161;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        position: static;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .messages-container {
        grid-template-columns: 1fr;
    }
    
    .message-view {
        display: none;
    }
    
    .applications-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-main {
        padding: 20px;
    }
    
    .welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .profile-header-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .application-details {
        flex-direction: column;
    }
    
    .application-details img {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .applications-stats {
        grid-template-columns: 1fr;
    }
    
    .filters-bar {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-group {
        flex-direction: column;
        width: 100%;
    }
}

/* ===== MOBILE SIDEBAR (HAMBURGER MENU) ===== */
@media (max-width: 768px) {
    .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100%;
        background: white;
        z-index: 1001;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    .dashboard-sidebar.open {
        left: 0;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
    }
    .sidebar-overlay.active {
        display: block;
    }
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
    .mobile-menu-btn {
        display: block !important;
        font-size: 24px;
        cursor: pointer;
        z-index: 1002;
    }
}