        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary: #00D4FF;
            --secondary: #0099CC;
            --dark: #0A0E27;
            --darker: #050714;
            --light: #F0F6FF;
            --accent: #FF6B6B;
            --success: #4ECDC4;
            --warning: #FFD93D;
            --danger: #FF6B6B;
        }

        /* Light theme variables */
        body.light-theme {
            --bg-primary: #ffffff;
            --bg-secondary: #f8f9fa;
            --bg-tertiary: #f0f2f5;
            --text-primary: #1a1a1a;
            --text-secondary: #4a5568;
            --text-tertiary: #718096;
            --border-color: #e2e8f0;
            --card-bg: #ffffff;
            --card-hover: #f8f9fa;
            --input-bg: #ffffff;
            --modal-bg: #ffffff;
			--text-link: #222;
            --header-bg: rgba(255, 255, 255, 0.95);
        }

        /* Dark theme variables */
        body.dark-theme {
            --bg-primary: var(--darker);
            --bg-secondary: var(--dark);
            --bg-tertiary: rgba(240, 246, 255, 0.05);
            --text-primary: var(--light);
            --text-secondary: rgba(240, 246, 255, 0.8);
            --text-tertiary: rgba(240, 246, 255, 0.6);
            --border-color: rgba(0, 212, 255, 0.3);
            --card-bg: rgba(240, 246, 255, 0.05);
            --card-hover: rgba(0, 212, 255, 0.1);
            --input-bg: rgba(240, 246, 255, 0.1);
            --modal-bg: var(--dark);
			--text-link: #ddd;
            --header-bg: rgba(10, 14, 39, 0.95);
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
            overflow-x: hidden;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        /* Background Animation - only for dark theme */
        .bg-animation {
            position: fixed;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            z-index: -1;
            background: linear-gradient(135deg, #0A0E27 0%, #050714 100%);
            overflow: hidden;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        body.dark-theme .bg-animation {
            opacity: 1;
        }

        body.light-theme .bg-animation {
            background: var(--bg-secondary);
            opacity: 1;
        }

        .bg-animation::before {
            content: '';
            position: absolute;
            width: 200%;
            height: 200%;
            top: -50%;
            left: -50%;
            background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
            animation: rotate 30s linear infinite;
        }

        body.light-theme .bg-animation::before {
            display: none;
        }

        @keyframes rotate {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Header */
        header {
            background: var(--header-bg);
            backdrop-filter: blur(10px);
            padding: 1rem 0;
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
            border-bottom: 1px solid var(--border-color);
            transition: all 0.3s ease;
        }

        nav {
			position: relative;
            max-width: 1200px;			
            margin: 0 auto;
            padding: 0 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.8rem;
            font-weight: bold;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            cursor: pointer;
        }

        .nav-links {
            display: flex;
            gap: 2rem;
            align-items: center;
        }

.nav-links a, .nav-links button:not(.nav-post-job) {
    color: var(--text-primary);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links button:not(.nav-post-job):hover {
    color: var(--primary);
}


        /* Theme Toggle */
        .theme-toggle {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1.4rem;
            color: var(--text-primary);
            transition: transform 0.3s;
            padding: 0.5rem;
        }

        .theme-toggle:hover {
            transform: scale(1.1);
        }

        /* Mobile Menu Toggle */
        .mobile-menu-toggle {
            display: none;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 1.5rem;
            color: var(--text-primary);
            padding: 0.5rem;
        }

        /* Mobile Navigation */
        @media (max-width: 768px) {
            .nav-links {
                position: fixed;
                top: 60px;
                left: -100%;
                width: 100%;
                height: calc(100vh - 60px);
                background: var(--bg-primary);
                flex-direction: column;
                padding: 2rem;
                gap: 1rem;
                transition: left 0.3s ease;
                border-top: 1px solid var(--border-color);
                z-index: 999;
            }

            .nav-links.active {
                left: 0;
            }

            .mobile-menu-toggle {
                display: block;
            }

            nav {
                padding: 0 1rem;
            }

            .logo {
                font-size: 1.5rem;
            }
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            padding: 0.7rem 1.5rem;
            border-radius: 25px;
            text-decoration: none;
            border: none;
            cursor: pointer;
            font-size: 1rem;
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
        }

        /* Main Content */
        .main-content {
            margin-top: 80px;
            min-height: calc(100vh - 80px);
        }

        /* Container */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem;
        }

        @media (max-width: 768px) {
            .container {
                padding: 1rem;
            }
        }

        /* Forms */
        .auth-container {
         max-width: 400px;
         width: 90%;
         margin: 0 auto;
         background: var(--card-bg);
         border: 1px solid var(--border-color);
         border-radius: 20px;
         padding: 2rem;
         box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
       }

/* Main content wrapper for auth pages */
.main-content.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 0;
}


 /* Mobile styles - keep forms at top */
@media (max-width: 768px) {
    .main-content.auth-page {
        display: block;
        padding: 2rem 0;
        align-items: flex-start;
    }

    .auth-container {
        margin: 0 auto;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .main-content.auth-page {
        padding: 1rem 0;
    }

    .auth-container {
        margin: 0 auto;
        padding: 1.5rem;
        max-width: 95%;
    }
}

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            color: var(--primary);
        }

        .form-group input,
        .form-group textarea,
        .form-group select {
            width: 100%;
            padding: 1rem;
            background: var(--input-bg);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            color: var(--text-primary);
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        /* Fix for dark mode select elements */
        body.dark-theme .form-group select {
            background-color: var(--input-bg);
            color: var(--text-primary);
        }

        body.dark-theme .form-group select option {
            background-color: var(--bg-secondary);
            color: var(--text-primary);
        }

body.dark-theme .modal select {
    background-color: var(--input-bg) !important;
    color: var(--text-primary) !important;
}

body.dark-theme .modal select option {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

        .form-group input:focus,
        .form-group textarea:focus,
        .form-group select:focus {
            outline: none;
            border-color: var(--primary);
            background: var(--input-bg);
            box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
        }

        /* Job Cards */
        .job-grid {
            display: grid;
            gap: 1.5rem;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        }

        @media (max-width: 768px) {
            .job-grid {
                grid-template-columns: 1fr;
            }
        }

        .job-card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 15px;
            padding: 2rem;
            transition: all 0.3s;
            cursor: pointer;
            position: relative;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        .job-card:hover {
            background: var(--card-hover);
            border-color: var(--primary);
            transform: translateX(5px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .company-logo {
            width: 60px;
            height: 60px;
            border-radius: 10px;
            object-fit: cover;
            position: absolute;
            top: 2rem;
            right: 2rem;
        }

        @media (max-width: 480px) {
            .company-logo {
                width: 50px;
                height: 50px;
                top: 1.5rem;
                right: 1.5rem;
            }
        }

        .job-header {
            margin-bottom: 1rem;
            padding-right: 80px;
        }

        .job-title {
            font-size: 1.4rem;
            color: var(--primary);
            margin-bottom: 0.5rem;
        }

        .company-name {
            color: var(--text-secondary);
            font-size: 1.1rem;
        }

        .job-details {
            display: flex;
            gap: 1.5rem;
            margin: 1rem 0;
            flex-wrap: wrap;
        }

        @media (max-width: 480px) {
            .job-details {
                gap: 1rem;
            }
        }

        .job-detail {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--text-tertiary);
            font-size: 0.9rem;
        }

        .job-tags {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            margin-top: 1rem;
        }

        .tag {
            background: rgba(78, 205, 196, 0.2);
            color: var(--success);
            padding: 0.3rem 0.8rem;
            border-radius: 15px;
            font-size: 0.85rem;
        }

        /* Dashboard */
        .dashboard-header {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 15px;
            padding: 2rem;
            margin-bottom: 2rem;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        @media (max-width: 768px) {
            .dashboard-header {
                padding: 1.5rem;
            }
        }

        .dashboard-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1.5rem;
            margin-top: 2rem;
        }

        @media (max-width: 480px) {
            .dashboard-stats {
                grid-template-columns: 1fr;
            }
        }

        .stat-card {
            background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 204, 0.1) 100%);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 1.5rem;
            text-align: center;
        }

        .stat-number {
            font-size: 2rem;
            color: var(--primary);
            font-weight: bold;
        }

        /* Tabs */
        .tabs {
            display: flex;
            gap: 1rem;
            margin-bottom: 2rem;
            border-bottom: 1px solid var(--border-color);
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .tab {
            padding: 1rem 2rem;
            background: none;
            border: none;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.3s;
            border-bottom: 3px solid transparent;
            white-space: nowrap;
        }

        @media (max-width: 480px) {
            .tab {
                padding: 0.8rem 1.2rem;
                font-size: 0.9rem;
            }
        }

        .tab.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }

        /* Modal */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 2000;
            overflow-y: auto;
            padding: 1rem;
        }

.modal-content {
    background: var(--modal-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    max-width: 600px;
    margin: 5% auto;
    padding: 3rem 2rem 2rem 2rem;  /* Add more top padding for close button */
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .modal-content {
        margin: 2% auto;
        padding: 1.5rem;  /* Keep original mobile padding */
        max-width: 95%;
    }
}

.close-modal {
    position: absolute;
    top: 1.2rem;      /* Slightly increased from 1rem */
    right: 1.2rem;    /* Slightly increased from 1rem */
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: color 0.3s;
    width: 2rem;      /* Add fixed width */
    height: 2rem;     /* Add fixed height */
    display: flex;    /* Center the × symbol */
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-modal:hover {
    color: var(--primary);
}

        /* Application List */
        .application-card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 15px;
            padding: 1.5rem;
            margin-bottom: 1rem;
            transition: all 0.3s;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        .application-card:hover {
            background: var(--card-hover);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .application-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 1rem;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .applicant-info h3 {
            color: var(--primary);
            margin-bottom: 0.5rem;
        }

        .application-status {
            padding: 0.3rem 1rem;
            border-radius: 20px;
            font-size: 0.9rem;
        }

        .status-pending {
            background: rgba(255, 217, 61, 0.2);
            color: var(--warning);
        }

        .status-reviewed {
            background: rgba(0, 212, 255, 0.2);
            color: var(--primary);
        }

        .status-accepted {
            background: rgba(78, 205, 196, 0.2);
            color: var(--success);
        }

        .status-rejected {
            background: rgba(255, 107, 107, 0.2);
            color: var(--danger);
        }

        /* File Upload */
        .file-upload {
            position: relative;
            display: inline-block;
            cursor: pointer;
            width: 100%;
        }

        .file-upload input[type=file] {
            position: absolute;
            left: -9999px;
        }

        .file-upload-label {
            display: block;
            padding: 1rem;
            background: var(--bg-tertiary);
            border: 2px dashed var(--border-color);
            border-radius: 10px;
            text-align: center;
            transition: all 0.3s;
            color: var(--text-secondary);
        }

        .file-upload-label:hover {
            background: var(--card-hover);
            border-color: var(--primary);
        }

        /* Avatar Upload Styles */
        .avatar-upload-container {
            display: flex;
            align-items: center;
            gap: 2rem;
            margin-bottom: 2rem;
        }

        .avatar-preview {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            object-fit: cover;
            border: 3px solid var(--border-color);
            background: var(--bg-tertiary);
        }

        .avatar-upload-btn {
            padding: 0.5rem 1rem;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s;
            color: var(--text-primary);
        }

        .avatar-upload-btn:hover {
            background: var(--card-hover);
            border-color: var(--primary);
        }

        /* Profile Form Styles */
        .profile-container {
            max-width: 800px;
            margin: 0 auto;
        }

        .profile-card {
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 20px;
            padding: 2rem;
            margin-bottom: 2rem;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .profile-section {
            margin-bottom: 2rem;
        }

        .profile-section h3 {
            color: var(--primary);
            margin-bottom: 1.5rem;
            font-size: 1.3rem;
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1.5rem;
        }

        /* Search Box */
        .search-container {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            margin: 2rem 0;
            align-items: center;
        }

        @media (max-width: 768px) {
            .search-container {
                flex-direction: column;
            }

            .search-container input,
            .search-container select {
                width: 100% !important;
            }
        }

        /* Alerts */
        .alert {
            padding: 1rem;
            border-radius: 10px;
            margin-bottom: 1rem;
        }

        .alert-success {
            background: rgba(78, 205, 196, 0.2);
            color: var(--success);
            border: 1px solid var(--success);
        }

        .alert-error {
            background: rgba(255, 107, 107, 0.2);
            color: var(--danger);
            border: 1px solid var(--danger);
        }

        /* Applications Table */
        .applications-table {
            width: 100%;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

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

        .applications-table th {
            background: var(--bg-tertiary);
            padding: 1rem;
            text-align: left;
            font-weight: 600;
            color: var(--primary);
            border-bottom: 2px solid var(--border-color);
        }


        .applications-table tr:hover {
            background: var(--card-hover);
        }

        .applications-table tr:last-child td {
            border-bottom: none;
        }

        @media (max-width: 768px) {
            .applications-table {
                overflow-x: auto;
            }

            .applications-table table {
                min-width: 600px;
            }
        }

        /* Toast */
        .toast {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            background: var(--dark);
            color: white;
            padding: 1rem 1.5rem;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.4);
            z-index: 9999;
            transition: all 0.3s ease;
            max-width: 90%;
        }

        @media (max-width: 480px) {
            .toast {
                bottom: 1rem;
                right: 1rem;
                left: 1rem;
            }
        }

        .toast.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .toast-success { background: var(--success); }
        .toast-error { background: var(--danger); }

        /* Loading */
        .loading {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(0, 212, 255, 0.3);
            border-radius: 50%;
            border-top-color: var(--primary);
            animation: spin 1s ease-in-out infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .hidden {
            display: none;
        }

        /* Footer */
        footer {
            text-align: center;
            padding: 2rem;
            background: var(--bg-secondary);
            color: var(--text-secondary);
            border-top: 1px solid var(--border-color);
        }

        /* Utility Classes */
        @media (max-width: 768px) {
            .hide-mobile {
                display: none !important;
            }
        }

        /* Form Input Styles for Better Mobile Experience */
        input, textarea, select {
            font-size: 16px; /* Prevents zoom on iOS */
        }

        /* Improve button tap targets for mobile */
        @media (max-width: 768px) {
            button, .btn-primary, .tab, a {
                min-height: 44px;
                display: inline-flex;
                align-items: center;
                justify-content: center;
            }
        }

        /* First time user prompt */
        .welcome-prompt {
            background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 204, 0.1) 100%);
            border: 1px solid var(--primary);
            border-radius: 15px;
            padding: 2rem;
            margin-bottom: 2rem;
            text-align: center;
        }

        .welcome-prompt h2 {
            color: var(--primary);
            margin-bottom: 1rem;
        }

        .welcome-prompt p {
            color: var(--text-secondary);
            margin-bottom: 1.5rem;
        }

                .new-badge {
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  margin-left: 0.3rem;
}

.btn-small {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  border: 1px solid #ccc;
  background: #f4f4f4;
  cursor: pointer;
  border-radius: 4px;
}
.btn-small:hover {
  background: #eaeaea;
}
.hidden {
  display: none !important;
}

/* ❌ REPLACE these existing styles in your CSS: */

/* OLD - Remove this entire block */
.notification-bell {
  font-size: 1.3rem;
  margin-left: 0.5rem;
  color: var(--text-primary);
  transition: color 0.3s;
}
.notification-bell.new-alert {
  color: var(--danger);
}

/* OLD - Remove this entire block */
.notification-dropdown {
  position: absolute;
  top: 40px;
  min-width: 300px;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  z-index: 1000;
  padding: 1rem;
  max-height: 400px;
  overflow-y: auto;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #333;
  transition: opacity 0.2s ease;
}
.notification-dropdown ul {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0 0 0;
}
.notification-dropdown li {
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: background 0.2s;
}
.notification-dropdown li:last-child {
  border-bottom: none;
}
.notification-dropdown li:hover {
  background: #f9f9f9;
}
.notification-dropdown img.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* ✅ KEEP these existing styles: */
.btn-small {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  border: 1px solid #ccc;
  background: #f4f4f4;
  cursor: pointer;
  border-radius: 4px;
}
.btn-small:hover {
  background: #eaeaea;
}
.hidden {
  display: none !important;
}

/* ➕ ADD these NEW styles: */

/* Notification Badge Styles */
.notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0.2rem 0.4rem;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: notificationPulse 2s infinite;
}

/* Pulse animation for new notifications */
@keyframes notificationPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Notification Bell Wrapper */
#notificationWrapper {
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.3s;
}

#notificationWrapper:hover {
  background-color: var(--bg-tertiary);
}

/* Updated notification dropdown styles with theme support */
.notification-dropdown {
  position: absolute;
  top: 40px;
  min-width: 320px;
  max-width: 400px;
  background: var(--modal-bg);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 1000;
  padding: 1rem;
  max-height: 400px;
  overflow-y: auto;
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: opacity 0.2s ease;
}

.notification-dropdown h4 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.notification-dropdown ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.notification-dropdown li {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: background 0.2s;
  border-radius: 8px;
  margin-bottom: 0.25rem;
}

.notification-dropdown li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.notification-dropdown li:hover {
  background: var(--card-hover);
}

/* Unread notification styling */
.notification-dropdown li.unread-notification {
  background: rgba(0, 212, 255, 0.1);
  border-left: 3px solid var(--primary);
  font-weight: 500;
}

.notification-dropdown li.unread-notification:hover {
  background: rgba(0, 212, 255, 0.15);
}

.notification-dropdown img.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-color);
}

.notification-dropdown .btn-small {
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  color: var(--text-primary);
}

.notification-dropdown .btn-small:hover {
  background: var(--card-hover);
  border-color: var(--primary);
}

/* Responsive notification dropdown */
@media (max-width: 768px) {
  .notification-dropdown {
    min-width: 280px;
    max-width: calc(100vw - 2rem);
    left: 50% !important;
    transform: translateX(-50%);
  }

  .notification-dropdown li {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .notification-dropdown img.avatar {
    width: 32px;
    height: 32px;
  }
}

/* Dark theme adjustments for notifications */
body.dark-theme .notification-dropdown {
  background: var(--modal-bg);
  border-color: var(--border-color);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

body.dark-theme .notification-dropdown li.unread-notification {
  background: rgba(0, 212, 255, 0.15);
}

body.dark-theme .notification-dropdown li.unread-notification:hover {
  background: rgba(0, 212, 255, 0.2);
}

/* Bell icon hover effect */
#notificationBell {
  transition: all 0.3s ease;
}

#notificationWrapper:hover #notificationBell {
  transform: rotate(15deg);
}

/* Notification count badge responsive sizing */
.notification-badge {
  font-size: 0.65rem;
}

@media (max-width: 480px) {
  .notification-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.3rem;
    min-width: 16px;
  }
}

/* Notification dismiss button */
.notification-dismiss-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 20px;
  height: 20px;
  border: none;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: all 0.2s ease;
  font-weight: bold;
  z-index: 10;
}

.notification-dismiss-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  background: #ff4444;
}

.notification-dismiss-btn:active {
  transform: scale(0.95);
}

/* Update notification dropdown li to accommodate dismiss button */
.notification-dropdown li {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  display: block; /* Changed from flex to block */
  transition: all 0.2s;
  border-radius: 8px;
  margin-bottom: 0.25rem;
  position: relative; /* Important for absolute positioning of dismiss button */
}

.notification-dropdown li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.notification-dropdown li:hover {
  background: var(--card-hover);
}

.notification-dropdown li:hover .notification-dismiss-btn {
  opacity: 1;
}

/* Unread notification styling */
.notification-dropdown li.unread-notification {
  background: rgba(0, 212, 255, 0.1);
  border-left: 3px solid var(--primary);
  font-weight: 500;
}

.notification-dropdown li.unread-notification:hover {
  background: rgba(0, 212, 255, 0.15);
}

/* Small danger button style for dismiss all */
.btn-small-danger {
  background: var(--danger) !important;
  color: white !important;
  border-color: var(--danger) !important;
}

.btn-small-danger:hover {
  background: #ff4444 !important;
  border-color: #ff4444 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .notification-dismiss-btn {
    width: 18px;
    height: 18px;
    font-size: 12px;
    top: 0.4rem;
    right: 0.4rem;
  }

  .notification-dropdown li {
    padding: 0.5rem;
    padding-right: 2rem; /* More space for dismiss button on mobile */
  }
}

/* Animation for notification removal */
.notification-dropdown li.removing {
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

/* ADD these CSS styles to your existing <style> section in index.html: */

/* Avatar Viewer Modal */
.avatar-viewer-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 3000; /* Higher than regular modals */
  cursor: pointer;
  animation: fadeIn 0.3s ease;
}

.avatar-viewer-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.avatar-viewer-image {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  background: var(--card-bg);
  padding: 0.5rem;
}

.avatar-viewer-info {
  background: var(--modal-bg);
  padding: 1rem 2rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.avatar-viewer-name {
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.avatar-viewer-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: var(--danger);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.avatar-viewer-close:hover {
  transform: scale(1.1);
  background: #ff4444;
}

/* Make avatars in application detail clickable */
.application-detail-avatar {
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.application-detail-avatar:hover {
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

/* Click hint */
.avatar-click-hint {
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.application-detail-avatar:hover .avatar-click-hint {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .avatar-viewer-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .avatar-viewer-image {
    max-height: 70vh;
  }

  .avatar-viewer-close {
    top: 1rem;
    right: 1rem;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }

  .avatar-viewer-info {
    padding: 0.8rem 1.5rem;
    margin: 0 1rem;
  }
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.avatar-viewer-modal.closing {
  animation: fadeOut 0.3s ease;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.verification-timer {
  margin-top: 1rem;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* Add this CSS to your style.css file to fix checkbox alignment */

/* Fix for resume upload checkbox alignment */
.form-group label input[type="checkbox"] {
    display: inline-block;
    vertical-align: top;
    margin-right: 0.5rem;
    margin-top: 0.2rem;
    width: auto;
    padding: 0;
}

/* Ensure checkbox labels don't center the content */
.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    text-align: left;
}

/* Fallback for browsers that don't support :has() */
.form-group label[style*="color: var(--text-secondary)"] {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    text-align: left !important;
}

.form-group label[style*="color: var(--text-secondary)"] input[type="checkbox"] {
    margin: 0.2rem 0.5rem 0 0 !important;
    width: auto !important;
    flex-shrink: 0;
}

.blog-post h1 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.blog-post .blog-body h2 {
  margin-top: 1.5rem;
  color: var(--text-primary);
}

.blog-post .blog-body p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.post-job-button {
  background: linear-gradient(135deg, #00D4FF, #0099CC);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.post-job-button:hover {
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
  transform: translateY(-1px);
}

.nav-post-job {
  background: linear-gradient(135deg, #00D4FF, #0099CC);
  color: white;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  border: none;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(0, 212, 255, 0.15);
}

.nav-post-job:hover {
  background: linear-gradient(135deg, #00c4ee, #008abb);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
  transform: translateY(-1px);
  color: white;
}

/* User Type Selection Styles */
.user-type-selection {
  text-align: center;
}

.user-type-cards {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Exactly 2 columns on desktop */
  gap: 2rem;
  margin-top: 2rem;
  max-width: 800px; /* Optional: limit max width */
  margin-left: auto;
  margin-right: auto;
}

.user-type-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.user-type-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 204, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.user-type-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.user-type-card:hover::before {
  opacity: 1;
}

.user-type-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  filter: grayscale(0.3);
  transition: filter 0.3s ease;
}

.user-type-card:hover .user-type-icon {
  filter: grayscale(0);
}

.user-type-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
}

.user-type-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.user-type-card ul {
  list-style: none;
  padding: 0;
  text-align: left;
  position: relative;
  z-index: 1;
}

.user-type-card li {
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .user-type-cards {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1.5rem;
  }
  
  .user-type-card {
    padding: 2rem 1.5rem;
  }
  
  .user-type-icon {
    font-size: 3rem;
  }
}

.kaspa-confirm {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.kaspa-confirm.hidden {
  display: none;
}

.kaspa-confirm-content {
  background: var(--modal-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: fadeIn 0.2s ease;
}

.kaspa-confirm-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.kaspa-confirm-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.kaspa-btn {
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.kaspa-btn-confirm {
  background: var(--primary);
  color: white;
}

.kaspa-btn-cancel {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.kaspa-btn:hover {
  transform: scale(1.05);
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.job-badge {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.status-badge {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 0.2rem 0.6rem;
  font-weight: bold;
  text-transform: capitalize;
}

.status-pending { background-color: #ffc107; color: black; }
.status-reviewed { background-color: #17a2b8; color: white; }
.status-accepted { background-color: #28a745; color: white; }
.status-rejected { background-color: #dc3545; color: white; }

.btn-disabled {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 20px;
  cursor: not-allowed;
  opacity: 0.85;
  display: inline-block;
  transition: all 0.3s ease;
}

.btn-disabled:hover {
  transform: none;
  opacity: 1;
}

/*.job-card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.75rem;
  background-color: #eee;
  color: black;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.job-card .status-accepted  { background-color: #28a745; color: white; }
.job-card .status-pending   { background-color: #ffc107; color: black; }
.job-card .status-rejected  { background-color: #dc3545; color: white; }*/

.job-description h1,
.job-description h2,
.job-description h3 {
  margin: 1rem 0 0.5rem;
  color: var(--primary);
}

.job-description p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.job-description ul,
.job-description ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.job-description li {
  margin-bottom: 0.5rem;
}

.job-description a {
  color: var(--primary);
  text-decoration: underline;
}

.job-description a:hover {
  opacity: 0.8;
}

.job-description code {
  background: var(--input-bg);
  color: var(--text-secondary);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  font-family: monospace;
}

.job-description pre {
  background: var(--card-bg);
  color: var(--text-primary);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 8px;
  margin: 1rem 0;
  font-family: monospace;
  font-size: 0.9rem;
}

.job-description blockquote {
  border-left: 3px solid var(--border-color);
  padding-left: 1rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: 1rem 0;
}

.job-description hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}

.status-inline {
    display: inline-block;
    font-size: 0.75rem;
    background-color: #eee;
    color: black;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

/* Status-specific colors for inline badges */
.status-inline.status-accepted { 
    background-color: #28a745; 
    color: white; 
}

.status-inline.status-pending { 
    background-color: #ffc107; 
    color: black; 
}

.status-inline.status-rejected { 
    background-color: #dc3545; 
    color: white; 
}

.status-inline.status-reviewed { 
    background-color: #17a2b8; 
    color: white; 
}

.profile-container .btn-primary[type="submit"] {
    margin-bottom: 3rem;
}

/* logo preview */
.logo-upload-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.logo-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%; /* Make it circular like avatar */
    object-fit: cover;
    border: 3px solid var(--border-color);
    background: var(--bg-tertiary);
}

.logo-upload-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-primary);
}

.logo-upload-btn:hover {
    background: var(--card-hover);
    border-color: var(--primary);
}

/* Mobile responsiveness for logo upload */
@media (max-width: 768px) {
    .logo-upload-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }
    
    .logo-preview {
        width: 100px;
        height: 100px;
    }
}

.autocomplete-list {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  z-index: 1000;
  max-height: 150px;
  overflow-y: auto;
  width: 100%;
}

.suggestion-item {
  padding: 8px;
  cursor: pointer;
}

.suggestion-item:hover {
  background-color: #f0f0f0;
}

/* Just add height specification for textareas */
.form-group textarea,
.modal textarea,
textarea {
    min-height: 350px;
    resize: vertical;
}

/* Optional: Smaller on mobile */
@media (max-width: 768px) {
    .form-group textarea,
    .modal textarea,
    textarea {
        min-height: 300px;
    }
}

/* Quill Editor Styling */
.quill-editor {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  transition: all 0.3s ease;
  overflow: hidden; /* Prevent content overflow */
  min-height: 200px;
  max-height: 400px; /* Prevent it from getting too tall */
}

.quill-editor:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* Quill Inner Container */
.quill-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Quill toolbar styling */
.ql-toolbar.ql-snow {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px 10px 0 0;
  padding: 8px;
  border-bottom: 1px solid var(--border-color) !important;
}

.ql-container.ql-snow {
  border: 1px solid var(--border-color);
  border-radius: 0 0 10px 10px;
  font-family: inherit;
  flex: 1;
  overflow-y: auto; /* Allow scrolling if content is too long */
  max-height: 300px; /* Limit content height */
}

/* Quill Editor Text Area */
.ql-editor {
  padding: 12px;
  line-height: 1.5;
  color: var(--text-primary);
  min-height: 150px;
  max-height: 280px; /* Prevent overflow */
  overflow-y: auto; /* Scroll if needed */
}

/* Fix placeholder text color */
.ql-editor.ql-blank::before {
  color: var(--text-tertiary);
  font-style: italic;
}

/* Modal specific fixes */
.modal .quill-editor {
  max-height: 300px; /* Smaller in modals */
}

.modal .ql-container {
  max-height: 220px;
}

.modal .ql-editor {
  max-height: 200px;
}

/* Dark theme Quill styling */
body.dark-theme .ql-toolbar.ql-snow {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}
body.dark-theme .ql-toolbar.ql-snow .ql-stroke {
  stroke: var(--text-secondary);
}
body.dark-theme .ql-toolbar.ql-snow .ql-fill,
body.dark-theme .ql-toolbar.ql-snow .ql-stroke.ql-fill {
  fill: var(--text-secondary);
}
body.dark-theme .ql-toolbar.ql-snow .ql-picker {
  color: var(--text-secondary);
}
body.dark-theme .ql-toolbar.ql-snow .ql-picker-options {
  background: var(--modal-bg);
  border-color: var(--border-color);
}
body.dark-theme .ql-toolbar.ql-snow .ql-picker-label:hover,
body.dark-theme .ql-toolbar.ql-snow .ql-picker-label.ql-active,
body.dark-theme .ql-toolbar.ql-snow .ql-picker-item:hover,
body.dark-theme .ql-toolbar.ql-snow .ql-picker-item.ql-selected,
body.dark-theme .ql-toolbar.ql-snow button:hover,
body.dark-theme .ql-toolbar.ql-snow button.ql-active {
  color: var(--primary);
}
body.dark-theme .ql-toolbar.ql-snow button:hover .ql-stroke,
body.dark-theme .ql-toolbar.ql-snow button.ql-active .ql-stroke {
  stroke: var(--primary);
}
body.dark-theme .ql-toolbar.ql-snow button:hover .ql-fill,
body.dark-theme .ql-toolbar.ql-snow button.ql-active .ql-fill {
  fill: var(--primary);
}
body.dark-theme .ql-editor {
  color: var(--text-primary);
}
body.dark-theme .ql-editor.ql-blank::before {
  color: var(--text-tertiary);
}
body.dark-theme .ql-snow .ql-tooltip {
  background: var(--modal-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}
body.dark-theme .ql-snow .ql-tooltip input[type="text"] {
  background: var(--input-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
}

/* Ensure Quill editor text is visible in both themes */
.ql-editor p,
.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6,
.ql-editor li,
.ql-editor ol,
.ql-editor ul {
  color: var(--text-primary);
}
/* ============ MESSAGING SYSTEM STYLES ============ */

/* Message Thread Modal */
.message-thread-container {
    display: flex;
    flex-direction: column;
    height: 500px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-secondary);
    position: relative; /* Ensure proper stacking */
}

.message-thread-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}

.message-thread-header h2 {
    margin: 0 0 0.5rem 0;
    color: var(--primary);
}

.message-thread-header p {
    margin: 0;
    font-size: 0.9rem;
}

/* Messages List */
.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-secondary);
    /* Fix scrolling issues */
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.loading-messages {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-secondary);
}

.no-messages {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
}

/* Individual Message Items */
.message-item {
    max-width: 80%;
    margin-bottom: 1rem;
}

.message-item.own-message {
    align-self: flex-end;
    margin-left: auto;
}

.message-item.other-message {
    align-self: flex-start;
    margin-right: auto;
}

/* Ensure message container doesn't expand beyond modal */
.message-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Prevent expansion */
    max-width: 100%;
    overflow: hidden;
}


.message-item.own-message .message-content {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 204, 0.1) 100%);
    border-color: var(--primary);
    border-radius: 15px 5px 15px 15px;
}

.message-item.other-message .message-content {
    background: var(--card-bg);
    border-radius: 5px 15px 15px 15px;
}

/* Updated message styling with timestamp below */
.message-header {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.message-sender {
    font-weight: bold;
    color: var(--primary);
}

.message-time {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    text-align: right;
    margin-top: 0.5rem;
    font-style: italic;
}

/* For own messages, align timestamp to the left */
.message-item.own-message .message-time {
    text-align: left;
}

/* Fix message text wrapping */
.message-text {
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    /* Add word breaking for long strings */
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    /* Ensure container doesn't expand */
    max-width: 100%;
    /* Handle really long unbreakable strings */
    hyphens: auto;
}

.message-text p {
    margin: 0 0 0.5rem 0;
    /* Apply same breaking rules to paragraphs */
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.message-text p:last-child {
    margin-bottom: 0;
}

/* Handle links specifically - preserve URL integrity */
.message-text a {
    color: var(--primary);
    text-decoration: underline;
    /* Allow URLs to wrap to new lines but don't break within the URL */
    word-break: normal;
    overflow-wrap: break-word;
    /* Allow line breaks before/after URLs but not within */
    white-space: normal;
}

.message-text a:hover {
    opacity: 0.8;
}

.message-text h1,
.message-text h2,
.message-text h3 {
    color: var(--primary);
    margin: 0.5rem 0;
}

.message-text ul,
.message-text ol {
    margin: 0.5rem 0;
    padding-left: 1.2rem;
}

/* Handle code and pre blocks */
.message-text code {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.9rem;
    /* Break long code snippets */
    word-break: break-all;
    overflow-wrap: break-word;
}

.message-text pre {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 1rem;
    overflow-x: auto;
    border-radius: 8px;
    margin: 1rem 0;
    font-family: monospace;
    font-size: 0.9rem;
    /* Allow horizontal scrolling for code blocks */
    white-space: pre-wrap;
    word-wrap: break-word;
}


/* Message Input Container */
.message-input-container {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
}

.quick-message-input {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.quick-message-input textarea {
    flex: 1;
    min-height: 60px;
    max-height: 120px;
    resize: vertical;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    /* Handle long input text */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.quick-message-input textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.quick-message-input button {
    align-self: flex-end;
    white-space: nowrap;
    min-height: 44px;
}

/* Message Buttons */
.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.message-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.message-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Status Update Modal */
.status-update-modal .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.status-update-modal .form-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Message Notifications */
.message-notification {
    border-left: 3px solid var(--primary) !important;
}

.message-notification .notification-dismiss-btn {
    background: var(--primary) !important;
}

.message-notification:hover {
    background: rgba(0, 212, 255, 0.1) !important;
}

/* Enhanced Application Cards with Message Buttons */
.application-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    align-items: center;
}

.applications-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

/* Align message button with status in applications table */
.applications-table .application-actions {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Make the status badge consistent */
.applications-table .application-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px; /* Match button height approximately */
}

/* Ensure buttons in table have consistent sizing */
.applications-table .btn-secondary {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.application-actions .btn-primary,
.application-actions .btn-secondary {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

/* Message Thread Responsive Design */
@media (max-width: 768px) {
    .message-thread-container {
        height: 400px;
    }
    
	 .message-text {
        font-size: 0.9rem;
    }
    
    .message-text code {
        font-size: 0.8rem;
    }
    
    .message-text pre {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
	
    .message-item {
        max-width: 90%;
    }
    
    .quick-message-input {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .quick-message-input textarea {
        min-height: 50px;
    }
    
    .quick-message-input button {
        align-self: stretch;
    }
    
    .message-content {
        padding: 0.75rem;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .application-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .application-actions .btn-primary,
    .application-actions .btn-secondary {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .message-thread-container {
        height: 350px;
    }
    
    .messages-list {
        padding: 0.5rem;
    }
    
    .message-input-container {
        padding: 0.75rem;
    }
    
    .message-thread-header {
        padding: 0.75rem;
    }
    
    .message-thread-header h2 {
        font-size: 1.2rem;
    }
}

/* Scrollbar Styling for Message List */
.messages-list::-webkit-scrollbar {
    width: 6px;
}

.messages-list::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.messages-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.messages-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Dark theme adjustments */
body.dark-theme .message-content {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-theme .message-item.own-message .message-content {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--primary);
}

body.dark-theme .quick-message-input textarea {
    background: var(--input-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-theme .quick-message-input textarea::placeholder {
    color: var(--text-tertiary);
}

/* Animation for new messages */
@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-item.new-message {
    animation: slideInMessage 0.3s ease-out;
}

/* Message status indicators */
.message-status {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
    text-align: right;
}

.message-status.read {
    color: var(--primary);
}

.message-status.unread {
    color: var(--text-tertiary);
}

/* Thread overview styles for inbox view */
.message-threads-overview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.thread-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.thread-item:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    transform: translateX(3px);
}

.thread-item.unread {
    border-left: 4px solid var(--primary);
    background: rgba(0, 212, 255, 0.05);
}

.thread-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Changed from center to flex-start */
  margin-bottom: 0.5rem;
  padding-right: 3rem; /* Add padding to avoid overlap with badge */
}

.thread-participant {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.1rem;
}

.thread-job-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.thread-last-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.thread-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.thread-time {
    font-size: 0.75rem;
}

.thread-unread-count {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

/* Empty states */
.no-message-threads {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.no-message-threads h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Loading states */
.loading-threads {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* Messaging permissions indicator */
.messaging-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.messaging-permission-note {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Status Options Modal */
.status-option-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.status-option-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.status-option-card:hover {
    border-color: var(--primary);
    background: var(--card-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.status-option-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.status-option-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.status-update-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .status-option-buttons {
        grid-template-columns: 1fr;
    }
    
    .status-option-card {
        padding: 1rem;
    }
    
    .status-update-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .status-update-container .status-dropdown {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }
}

/* Integration with existing application tables */
.applications-table .message-column {
    text-align: center;
    width: 100px;
}

.applications-table .message-button {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

/* Status message modal specific styling */
#statusMessageModal .form-group textarea {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    transition: border-color 0.3s ease;
    background: var(--input-bg);
    color: var(--text-primary);
}

#statusMessageModal .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

#statusMessageModal .form-group small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Button styling for status updates */
#statusMessageModal .btn-primary {
    background: linear-gradient(135deg, var(--success), #45a049);
}

#statusMessageModal .btn-primary:hover {
    background: linear-gradient(135deg, #45a049, var(--success));
    transform: translateY(-1px);
}

/* When modal is open, prevent body scrolling */
body.message-modal-open {
    overflow: hidden;
}

/* But allow scrolling within the message modal itself */
body.message-modal-open #messageThreadModal {
    overflow-y: auto;
}

body.message-modal-open #messageThreadModal .modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Messages Tab Styles */
.messages-threads-container {
  max-width: 800px;
  margin: 0 auto;
}

.message-threads-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-thread-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.message-thread-item:hover {
  background: var(--card-hover);
  border-color: var(--primary);
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.message-thread-item.thread-unread {
  border-left: 4px solid var(--primary);
  background: rgba(0, 212, 255, 0.05);
}

.message-thread-item.thread-unread:hover {
  background: rgba(0, 212, 255, 0.1);
}

/* Limit message preview length in threads list */
.message-thread-item .thread-content p {
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Change to 4 or 5 if you want more lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  max-height: 4.2em; /* 3 lines × 1.4 line-height = 4.2em */
}

/* Ensure consistent spacing */
.message-thread-item .thread-content p:last-child {
  margin-bottom: 0;
}

.thread-avatar {
  flex-shrink: 0;
}

.thread-content {
  flex: 1;
  min-width: 0;
  position: relative; /* For absolute positioning of badge */
}

.thread-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.thread-time {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  margin-top: 0.2rem; /* Add small top margin to align better */
}

.thread-unread-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  min-width: 20px;
  text-align: center;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 5; /* Ensure it's above other content */
}

.messages-tab-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-secondary);
}

/* Update dashboard stats to accommodate 3 cards for employers */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Mobile responsive adjustments for messages */
@media (max-width: 768px) {
  .thread-unread-badge {
    position: static; /* Change to static positioning on mobile */
    display: inline-block;
    margin-top: 0.5rem;
    margin-left: auto;
  }
  
  .thread-header {
    padding-right: 0; /* Remove extra padding on mobile */
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .thread-time {
    margin-top: 0;
  }
  
  .message-thread-item {
    padding: 1rem;
  }
  
  .thread-content {
    width: 100%;
    text-align: left;
  }
}

/* Message thread loading states */
.messages-tab-loading .loading {
  margin-bottom: 1rem;
}

/* Dark theme adjustments */
body.dark-theme .message-thread-item {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-theme .message-thread-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark-theme .message-thread-item.thread-unread {
  background: rgba(0, 212, 255, 0.1);
}

body.dark-theme .message-thread-item.thread-unread:hover {
  background: rgba(0, 212, 255, 0.15);
}

/* Elegant icon button styles for notifications */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  color: var(--text-tertiary);
  opacity: 0.7;
}

.btn-icon:hover {
  background: rgba(0, 212, 255, 0.1);
  color: var(--primary);
  opacity: 1;
  transform: scale(1.05);
}

.btn-icon-danger {
  color: var(--text-tertiary) !important;
  opacity: 0.7;
}

.btn-icon-danger:hover {
  background: rgba(255, 107, 107, 0.1) !important;
  color: var(--danger) !important;
  opacity: 1;
  transform: scale(1.05);
}

/* Responsive adjustments for icon buttons */
@media (max-width: 768px) {
  .btn-icon {
    width: 22px;
    height: 22px;
    font-size: 0.8rem;
  }
}

/* Dark theme adjustments */
body.dark-theme .btn-icon {
  color: var(--text-tertiary);
  opacity: 0.6;
}

body.dark-theme .btn-icon:hover {
  background: rgba(0, 212, 255, 0.15);
  color: var(--primary);
  opacity: 1;
}

body.dark-theme .btn-icon-danger:hover {
  background: rgba(255, 107, 107, 0.15) !important;
  color: var(--danger) !important;
}

/* Subtle animation for icon buttons */
.btn-icon:active {
  transform: scale(0.98);
}

/* Custom tooltip that appears outside the dropdown */
.custom-tooltip {
  position: fixed;
  background: var(--modal-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 2001;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.2s ease;
  font-weight: normal;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.custom-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

/* Dark theme tooltip adjustments */
body.dark-theme .custom-tooltip {
  background: var(--modal-bg);
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Handle legal notice */
.legal-modal {
  display: none;
  position: fixed;
  z-index: 9988;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  padding-top: 60px;
  backdrop-filter: blur(2px);
}
.legal-modal-content {
  background: #fff;
  margin: auto;
  padding: 2rem;
  width: 85%;
  max-width: 650px;
  max-height: 80%;
  overflow-y: auto;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.legal-close {
  float: right;
  font-size: 24px;
  cursor: pointer;
}
.legal-modal-body {
  white-space: pre-wrap;
  line-height: 1.5;
  margin-top: 1rem;
}

.legal-link {
  color: var(--text-link);
  font-weight: 500;
  text-decoration: none;
}

.legal-link:hover {
  text-decoration: underline;
}

.read-only-value {
    padding: 0.8rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.help-text {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    font-style: italic;
}

.editor-toggle-button {
  background-color: transparent;
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  font-size: 0.8rem;
  border-radius: 6px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.editor-toggle-button:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary);
}

/* Share modal */
.custom-modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.custom-modal-content {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  width: 360px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}

.btn-share {
  background: #0084ff;
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn-share:hover {
  background: #006bbd;
}


.btn-icon {
  font-size: 1.5rem;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-icon:hover {
  transform: scale(1.2);
  color: var(--primary-dark);
}
