:root {
    /* Jobie Brand Palette */
    --jobie-purple: #4C39AC;
    --jobie-purple-light: #5F4BCC;
    --jobie-purple-soft: rgba(76, 57, 172, 0.1);
    --jobie-bg: #F8F9FD;
    --jobie-sidebar-bg: #3F2C95;
    --jobie-white: #FFFFFF;
    
    /* Text Colors */
    --text-main: #333333;
    --text-muted: #888888;
    --text-light: #AAAAAA;
    
    /* Secondary Accents */
    --accent-blue: #3B82F6;
    --accent-orange: #F97316;
    --accent-pink: #EC4899;
    --accent-green: #10B981;
    
    /* UI Tokens */
    --radius-full: 9999px;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.08);
    --sidebar-width: 260px;
    --header-height: 80px;

    /* Semantic Surface Colors (for dark mode toggling) */
    --surface-card: #FFFFFF;
    --surface-input: #F8F9FD;
    --surface-hover: #F8F9FD;
    --border-color: #EEEEEE;
    --border-light: #F0F0F0;
    --modal-bg: #FFFFFF;
    --overlay-bg: rgba(0, 0, 0, 0.5);
    --chat-bubble-received: #FFFFFF;
    --chat-bubble-bg: #FAFAFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--jobie-bg);
    color: var(--text-main);
    overflow-x: hidden;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--jobie-sidebar-bg);
    position: fixed;
    left: 0;
    top: 0;
    color: white;
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 40px;
    margin-bottom: 50px;
}

.sidebar .logo img {
    width: 40px;
    height: 40px;
}

.sidebar .logo span {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-menu {
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 40px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border: none;
    background: none;
    width: 100%;
}

.menu-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.menu-item:hover {
    color: white;
}

/* Jobie Active State (Cutout effect) */
.menu-item.active {
    color: var(--jobie-purple);
    background-color: var(--jobie-bg);
    border-radius: 40px 0 0 40px;
    margin-left: 20px;
}

/* Sidebar Footer (Branding) */
.sidebar-footer {
    padding: 0 40px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 999;
}

.role-label.active {
    border-color: var(--jobie-purple) !important;
    background: var(--jobie-purple-soft) !important;
    color: var(--jobie-purple) !important;
}

/* --- Top Bar --- */
.top-bar {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background-color: transparent;
    position: sticky;
    top: 0;
    z-index: 100;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--jobie-purple);
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-left h2 {
    font-size: 24px;
    font-weight: 800;
    color: #333;
}

.global-search {
    display: flex;
    align-items: center;
    background: #EEE;
    border-radius: var(--radius-full);
    padding: 8px 20px;
    width: 350px;
    background-color: rgba(0,0,0,0.03);
}

.global-search i {
    color: var(--text-light);
    margin-right: 10px;
}

.global-search input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-icon {
    position: relative;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    box-shadow: var(--shadow-subtle);
    cursor: pointer;
    transition: 0.2s;
}

.action-icon:hover {
    transform: translateY(-2px);
}

.badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--jobie-purple);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 10px;
}

.user-profile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info .name {
    font-size: 14px;
    font-weight: 700;
}

.user-info .role {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   DASHBOARD / SEARCH PAGE
   ============================================ */
.content-area {
    padding: 20px 40px 40px;
}

/* --- Search Section --- */
.search-container {
    background: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.search-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.location-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 20px;
    border-right: 1px solid #EEE;
    color: var(--jobie-purple);
    font-weight: 600;
    cursor: pointer;
}

.main-search {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    padding: 10px;
}

.search-btns {
    display: flex;
    gap: 12px;
}

.btn-filter {
    background: #F0F0FF;
    color: var(--jobie-purple);
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-find {
    background-color: var(--jobie-purple);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: var(--radius-md);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-find:hover {
    background: var(--jobie-purple-light);
}

/* --- Suggestion Tags --- */
.suggestions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.suggestions span {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
}

.tag {
    padding: 10px 24px;
    border-radius: var(--radius-full);
    background: white;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-subtle);
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
}

.tag:hover {
    background-color: var(--jobie-purple);
    color: white;
}

.tag.active {
    background-color: var(--jobie-purple);
    color: white;
}

/* --- Results Header --- */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.results-count h3 {
    font-size: 18px;
    font-weight: 800;
}

.results-count p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.results-filters {
    display: flex;
    align-items: center;
    gap: 20px;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
}

.switch {
    width: 40px;
    height: 20px;
    background: #DDD;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
}

.switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: 0.2s;
}

.switch.on {
    background: var(--jobie-purple);
}

.switch.on::after {
    left: 22px;
}

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

.job-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-subtle);
    position: relative;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid transparent;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(76, 57, 172, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.company-logo {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    flex-shrink: 0;
}

/* Colorful logos */
.logo-blue { background-color: var(--accent-blue); }
.logo-orange { background-color: var(--accent-orange); }
.logo-pink { background-color: var(--accent-pink); }
.logo-green { background-color: var(--accent-green); }

.company-info .company-name {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 5px;
}

.job-card h4 {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 10px;
}

.salary-range {
    font-size: 15px;
    color: var(--jobie-purple);
    font-weight: 700;
    margin-bottom: 15px;
}

.job-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.badge-tag {
    padding: 6px 16px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-remote {
    background-color: #EEE;
    color: var(--jobie-purple);
}

.location {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */
/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes animateIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.animate-in {
    animation: animateIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Staggered animation for grid items */
.job-card:nth-child(1) { animation-delay: 0.1s; }
.job-card:nth-child(2) { animation-delay: 0.15s; }
.job-card:nth-child(3) { animation-delay: 0.2s; }
.job-card:nth-child(4) { animation-delay: 0.25s; }
.job-card:nth-child(5) { animation-delay: 0.3s; }
.job-card:nth-child(6) { animation-delay: 0.35s; }

@keyframes pulse-yellow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(251, 192, 45, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(251, 192, 45, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(251, 192, 45, 0); }
}

@media (max-width: 1024px) {
    .sidebar { 
        width: 280px; 
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sidebar.active { 
        transform: translateX(0); 
    }
    .sidebar.active + .main-wrapper .sidebar-overlay {
        display: block;
    }
    
    .sidebar .logo span, .menu-item span, .sidebar-footer { 
        display: block; 
    }
    
    .main-wrapper { 
        margin-left: 0; 
    }
    
    .mobile-nav-toggle {
        display: flex;
    }
    
    .top-bar {
        padding: 0 20px;
        background: white;
        border-bottom: 1px solid #EEE;
    }
    
    .global-search { 
        display: none; 
    }
    
    .content-area {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .job-grid {
        grid-template-columns: 1fr;
    }
    
    .search-container {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .search-input-group {
        width: 100%;
    }
    
    .btn-find {
        width: 100%;
        padding: 15px;
    }

    .modal-content {
        width: 95% !important;
        padding: 30px !important;
    }
    
    .drawer-content {
        width: 100% !important;
        padding: 25px !important;
    }
    
    .user-info {
        display: none;
    }

    .suggestions {
        padding: 0 5px 10px;
    }
}

/* ============================================
   DIAGNOSTIC & SUBMISSION UI
   ============================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
    padding: 30px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.category-item {
    background: white;
    border: 1px solid #EEE;
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 700;
}

.category-item i {
    display: block;
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--jobie-purple);
}

.category-item:hover, .category-item.selected {
    border-color: var(--jobie-purple);
    background: var(--jobie-purple-soft);
    transform: translateY(-3px);
}

.upload-zone {
    border: 2px dashed #DDD;
    padding: 40px;
    text-align: center;
    border-radius: var(--radius-lg);
    cursor: pointer;
    background: #FAFBFF;
    transition: 0.3s;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--jobie-purple);
    background: var(--jobie-purple-soft);
}

.upload-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-preview img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: var(--shadow-subtle);
}

/* Diagnosis Page Components */
.diagnosis-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 35px;
    box-shadow: var(--shadow-subtle);
    border-top: 5px solid var(--jobie-purple);
}

.confidence-meter {
    height: 8px;
    background: #EEE;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #6b52e1, #EC4899);
    transition: width 1s ease-out;
}

.safety-indicator {
    padding: 12px 20px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 14px;
}

.safety-indicator.safe { background: #E8F5E9; color: #2E7D32; }
.safety-indicator.caution { background: #FFF3E0; color: #E65100; }
.safety-indicator.danger { background: #FFEBEE; color: #C62828; }

.path-choice {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    height: 100%;
    transition: 0.3s;
    border: 1px solid #EEE;
}

.path-choice:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.path-choice-icon {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px;
}

.path-choice.diy .path-choice-icon { background: var(--jobie-purple-soft); color: var(--jobie-purple); }
.path-choice.pro .path-choice-icon { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); }

.path-choice ul {
    text-align: left;
    margin: 20px 0;
    padding-left: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.path-choice li { margin-bottom: 8px; }

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.status-badge.active { background: #E0F2FE; color: #0369A1; }
.status-badge.completed { background: #E8F5E9; color: #2E7D32; }
.status-badge.pending { background: #FFF3E0; color: #E65100; }

/* ============================================
   CHAT & MESSAGING
   ============================================ */
.chat-container {
    display: flex;
    height: 600px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
    overflow: hidden;
}

.chat-sidebar {
    width: 300px;
    border-right: 1px solid #EEE;
    display: flex;
    flex-direction: column;
}

.chat-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #EEE;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-list-item {
    padding: 15px 20px;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: 0.2s;
    border-bottom: 1px solid #F8F9FD;
}

.chat-list-item:hover {
    background: #F8F9FD;
}

.chat-list-item.active {
    background: var(--jobie-purple-soft);
    border-right: 3px solid var(--jobie-purple);
}

.chat-list-avatar {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--jobie-purple);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    position: relative;
    flex-shrink: 0;
}

.online-dot {
    width: 10px;
    height: 10px;
    background: #10B981;
    border: 2px solid white;
    border-radius: 50%;
    position: absolute;
    bottom: -2px;
    right: -2px;
}

.chat-list-info {
    flex: 1;
    overflow: hidden;
}

.chat-list-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
}

.chat-list-preview {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-list-time {
    font-size: 10px;
    color: var(--text-light);
}

.unread-badge {
    background: var(--jobie-purple);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 800;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #FAFBFF;
}

.chat-main-header {
    padding: 15px 25px;
    background: white;
    border-bottom: 1px solid #EEE;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-main-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-messages {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

.message.received {
    align-self: flex-start;
    background: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    border-bottom-left-radius: 2px;
}

.message.sent {
    align-self: flex-end;
    background: var(--jobie-purple);
    color: white;
    border-bottom-right-radius: 2px;
}

.message-time {
    display: block;
    font-size: 10px;
    margin-top: 5px;
    opacity: 0.6;
}

.chat-input-area {
    padding: 20px;
    background: white;
    border-top: 1px solid #EEE;
}

.chat-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #F8F9FD;
    padding: 8px 15px;
    border-radius: var(--radius-md);
}

.chat-input-group input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    outline: none;
    font-size: 14px;
}

.chat-input-btn {
    border: none;
    background: none;
    color: #888;
    cursor: pointer;
    font-size: 18px;
    transition: 0.2s;
}

.chat-input-btn:hover {
    color: var(--jobie-purple);
}

.chat-input-btn.send-btn {
    color: var(--jobie-purple);
}

@media (max-width: 768px) {
    .chat-sidebar {
        width: 100%;
    }
    .chat-open .chat-sidebar {
        display: none;
    }
    .chat-open .chat-main {
        display: flex;
    }
    .chat-main {
        display: none;
    }

    /* Additional Layout Fixes */
    .top-bar .badge {
        width: 16px;
        height: 16px;
        font-size: 8px;
        top: 2px;
        right: 2px;
    }

    .action-icon {
        width: 38px;
        height: 38px;
    }

    .top-right {
        gap: 12px;
    }

    /* Marketplace Fixes */
    .marketplace-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start !important;
    }

    .marketplace-filters {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
        display: flex;
        gap: 10px;
    }

    .filter-btn {
        white-space: nowrap;
        padding: 8px 16px !important;
    }

    .quote-card {
        padding: 20px !important;
    }

    .quote-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start !important;
    }

    .quote-details {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .quote-actions {
        flex-direction: column;
        gap: 10px;
    }

    .quote-actions .btn {
        width: 100%;
    }

    /* AI Chat Fixes */
    #aiChatWindow div[style*="max-width: 80%"] {
        max-width: 90% !important;
        font-size: 14px !important;
    }

    .diagnosis-card {
        padding: 20px !important;
    }

    .diagnosis-card h3 {
        font-size: 18px !important;
    }

    /* Booking Modal Fixes */
    .booking-step h2 {
        font-size: 22px !important;
    }

    .booking-step div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    #btnBookingNext, #btnBookingSubmit {
        width: 100%;
        margin-left: 0 !important;
    }

    #btnBookingBack {
        padding: 15px 10px !important;
    }
    /* Mobile Polish - Final Touches */
    .top-bar {
        height: 60px !important;
        padding: 0 15px !important;
    }
    
    .top-bar h2 {
        font-size: 18px !important;
    }

    .job-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 0 !important;
    }

    .job-card {
        border-radius: 15px !important;
        margin-bottom: 0 !important;
        width: 100% !important;
    }

    .main-search-wrapper {
        flex-direction: column !important;
        gap: 10px !important;
        border: none !important;
        background: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .location-picker, .main-search-input {
        background: white !important;
        border: 1px solid #EEE !important;
        border-radius: 15px !important;
        padding: 15px !important;
        width: 100% !important;
    }

    .btn-find {
        width: 100% !important;
        border-radius: 15px !important;
        padding: 15px !important;
        height: 55px !important;
    }

    .suggestions-container {
        padding: 10px 0 15px 0 !important;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        display: block !important;
    }

    .suggestion-chip {
        display: inline-block !important;
        margin-right: 8px !important;
        margin-bottom: 0 !important;
    }

    /* Modal Mobile Fixes */
    .modal-dialog {
        margin: 10px !important;
        max-width: calc(100% - 20px) !important;
    }

    .modal-content {
        border-radius: 20px !important;
        padding: 5px !important;
    }

    .auth-tabs {
        margin: -25px -25px 25px -25px !important;
        border-radius: 20px 20px 0 0 !important;
    }
}

/* ============================================
   DARK THEME
   ============================================ */
body.dark-theme {
    --jobie-bg: #0f1117;
    --jobie-white: #1a1b23;
    --jobie-sidebar-bg: #13141d;
    --jobie-purple-soft: rgba(76, 57, 172, 0.2);

    --text-main: #e4e4e7;
    --text-muted: #9ca3af;
    --text-light: #6b7280;

    --surface-card: #1a1b23;
    --surface-input: #22232d;
    --surface-hover: #22232d;
    --border-color: #2d2e3a;
    --border-light: #25262f;
    --modal-bg: #1a1b23;
    --overlay-bg: rgba(0, 0, 0, 0.7);
    --chat-bubble-received: #22232d;
    --chat-bubble-bg: #15161e;

    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* --- Global Dark Overrides --- */
body.dark-theme {
    background-color: var(--jobie-bg);
    color: var(--text-main);
}

body.dark-theme .sidebar {
    background-color: var(--jobie-sidebar-bg);
    border-right: 1px solid var(--border-color);
}

body.dark-theme .menu-item.active {
    background-color: var(--jobie-bg);
    color: var(--jobie-purple-light);
}

body.dark-theme .top-bar {
    background-color: transparent;
}

body.dark-theme .action-icon {
    background: var(--surface-card);
    color: var(--text-main);
    box-shadow: var(--shadow-subtle);
}

body.dark-theme .user-info .name {
    color: var(--text-main);
}

/* --- Cards --- */
body.dark-theme .job-card {
    background: var(--surface-card);
    border-color: var(--border-color);
}

body.dark-theme .job-card:hover {
    border-color: rgba(76, 57, 172, 0.4);
    box-shadow: var(--shadow-hover);
}

body.dark-theme .job-card h4 {
    color: var(--text-main);
}

body.dark-theme .glass-card {
    background: rgba(26, 27, 35, 0.8);
    border-color: var(--border-color);
}

body.dark-theme .category-item {
    background: var(--surface-card);
    border-color: var(--border-color);
    color: var(--text-main);
}

body.dark-theme .category-item:hover,
body.dark-theme .category-item.selected {
    background: var(--jobie-purple-soft);
    border-color: var(--jobie-purple);
}

/* --- Search --- */
body.dark-theme .search-container {
    background: var(--surface-card);
    box-shadow: var(--shadow-subtle);
}

body.dark-theme .main-search {
    color: var(--text-main);
    background: transparent;
}

body.dark-theme .main-search::placeholder {
    color: var(--text-light);
}

body.dark-theme .global-search {
    background-color: var(--surface-input);
}

body.dark-theme .global-search input {
    color: var(--text-main);
}

/* --- Tags --- */
body.dark-theme .tag {
    background: var(--surface-card);
    color: var(--text-main);
    box-shadow: var(--shadow-subtle);
}

body.dark-theme .tag:hover,
body.dark-theme .tag.active {
    background-color: var(--jobie-purple);
    color: white;
}

/* --- Modals --- */
body.dark-theme .modal-overlay {
    background: var(--overlay-bg);
}

body.dark-theme .modal-content {
    background: var(--modal-bg) !important;
    color: var(--text-main);
}

body.dark-theme .modal-content .form-control,
body.dark-theme .modal-content .form-select {
    background: var(--surface-input) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

body.dark-theme .modal-content .form-control::placeholder {
    color: var(--text-light);
}

body.dark-theme .modal-content .form-label {
    color: var(--text-muted) !important;
}

body.dark-theme .modal-content h2,
body.dark-theme .modal-content h3 {
    color: var(--text-main);
}

body.dark-theme .role-label {
    border-color: var(--border-color) !important;
    color: var(--text-main);
}

body.dark-theme .role-label.active {
    border-color: var(--jobie-purple) !important;
    background: var(--jobie-purple-soft) !important;
    color: var(--jobie-purple-light) !important;
}

/* --- Chat --- */
body.dark-theme .chat-container {
    background: var(--surface-card);
}

body.dark-theme .chat-sidebar {
    border-right-color: var(--border-color);
}

body.dark-theme .chat-sidebar-header {
    border-bottom-color: var(--border-color);
}

body.dark-theme .chat-list-item {
    border-bottom-color: var(--border-color);
}

body.dark-theme .chat-list-item:hover {
    background: var(--surface-hover);
}

body.dark-theme .chat-list-item.active {
    background: var(--jobie-purple-soft);
}

body.dark-theme .chat-main {
    background: var(--chat-bubble-bg);
}

body.dark-theme .chat-main-header {
    background: var(--surface-card);
    border-bottom-color: var(--border-color);
}

body.dark-theme .message.received {
    background: var(--chat-bubble-received);
    color: var(--text-main);
}

body.dark-theme .chat-input-area {
    background: var(--surface-card);
    border-top-color: var(--border-color);
}

body.dark-theme .chat-input-group {
    background: var(--surface-input);
}

body.dark-theme .chat-input-group input {
    color: var(--text-main);
}

/* --- Drawer --- */
body.dark-theme .drawer-content {
    background: var(--surface-card) !important;
    color: var(--text-main);
}

/* --- Diagnosis --- */
body.dark-theme .diagnosis-card {
    background: var(--surface-card);
    border-top-color: var(--jobie-purple);
}

/* --- Status Badges --- */
body.dark-theme .status-badge.active { background: rgba(3, 105, 161, 0.2); }
body.dark-theme .status-badge.completed { background: rgba(46, 125, 50, 0.2); }
body.dark-theme .status-badge.pending { background: rgba(230, 81, 0, 0.2); }

/* --- Path Choice --- */
body.dark-theme .path-choice {
    background: var(--surface-card);
    border-color: var(--border-color);
}

/* --- Upload Zone --- */
body.dark-theme .upload-zone {
    border-color: var(--border-color);
    background: var(--surface-input);
}

/* --- Booking Modal Dark --- */
body.dark-theme #bookingModal .modal-content {
    background: var(--modal-bg) !important;
    color: var(--text-main);
}

body.dark-theme #bookingModal label {
    border-color: var(--border-color) !important;
    color: var(--text-main);
}

body.dark-theme #bookingModal textarea {
    background: var(--surface-input) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

/* --- Confidence Meter --- */
body.dark-theme .confidence-meter {
    background: var(--border-color);
}

/* --- Scrollbar Styling --- */
body.dark-theme ::-webkit-scrollbar {
    width: 8px;
}

body.dark-theme ::-webkit-scrollbar-track {
    background: var(--jobie-bg);
}

body.dark-theme ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

body.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* --- Theme Toggle Button --- */
.theme-toggle {
    position: relative;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-card);
    box-shadow: var(--shadow-subtle);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    color: var(--text-main);
    font-size: 18px;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Smooth transition for theme switching */
body, body * {
    transition: background-color 0.3s ease, color 0.15s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Exclude elements that need instant animation */
.animate-in, .job-card, .btn-find, .btn, button {
    transition: background-color 0.3s ease, color 0.15s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease !important;
}

/* ============================================
   AI ASSISTANT — DARK MODE FIXES
   ============================================ */

/* AI chat window background */
body.dark-theme #aiChatWindow {
    background: transparent;
    color: var(--text-main);
}

/* AI (bot) response bubble — was hardcoded #F0F0FF (invisible on dark) */
body.dark-theme #aiChatWindow > div > div[style*="background:#F0F0FF"],
body.dark-theme #aiChatWindow > div > div[style*="background: #F0F0FF"] {
    background: var(--surface-input) !important;
    color: var(--text-main) !important;
}

/* AI input field */
body.dark-theme #aiQueryInput {
    background: var(--surface-input) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

body.dark-theme #aiQueryInput::placeholder {
    color: var(--text-light) !important;
}

/* AI page border separator */
body.dark-theme #page-ai-assistant .glass-card > div[style*="border-top"] {
    border-top-color: var(--border-color) !important;
}

/* Quick Fix panel — was hardcoded #FFF9C4 yellow (invisible on dark) */
body.dark-theme #aiQuickFix {
    background: rgba(76, 57, 172, 0.15) !important;
    border: 1px solid var(--border-color);
    color: var(--text-main) !important;
}

body.dark-theme #aiQuickFix h5 {
    color: var(--text-main) !important;
}

body.dark-theme #aiQuickFix li {
    color: var(--text-main);
}

/* AI result text */
body.dark-theme #aiResultText {
    color: white;
}

/* AI matching technician section heading */
body.dark-theme #page-ai-assistant h4.fw-bold {
    color: var(--text-main);
}
