/* --- 1. THEME VARIABLES --- */
:root {
  /* LIGHT MODE (Default) */
  --bg: #f8fafc;
  --card: #ffffff;
  --sidebar: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-2: #60a5fa;
  --active: #eef6ff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --input-bg: #ffffff;
  --icon-bg: #eff6ff; /* Light blue background for icons */
}

/* DARK MODE */
body.dark {
  --bg: #0f172a;        /* Deep Navy Background */
  --card: #1e293b;      /* Slate 800 for Cards */
  --sidebar: #020617;   /* Almost Black for Sidebar */
  --border: #334155;    /* Dark Gray Borders */
  --text: #f1f5f9;      /* White-ish Text */
  --muted: #94a3b8;     /* Light Gray for secondary text */
  --primary: #3b82f6;   /* Brighter Blue for contrast */
  --primary-2: #2563eb;
  --active: #1e293b;    /* Active state matches card */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --input-bg: #0f172a;  /* Dark inputs */
  --icon-bg: #334155;   /* Dark background for icons */
}

/* =============================================
   🚀 DARK MODE FIXES (Paste at bottom of file)
   ============================================= */

/* 1. Fix Profile Card (Name & Email) */
body.dark .adminCard {
    background-color: var(--card) !important; /* Turns card Dark Gray */
    border-color: var(--border) !important;
}

body.dark .admin-name {
    color: var(--text) !important; /* Turns Name White */
}

body.dark .admin-email {
    color: var(--muted) !important; /* Turns Email Light Gray */
}

/* 2. Fix Sidebar Navigation Hover/Active States */
body.dark .nav a:hover,
body.dark .nav a.active {
    background-color: #1e293b !important; /* Dark Blue background */
    color: #ffffff !important;            /* White Text */
}

/* 3. Fix the "Loading..." text color if user hasn't loaded */
body.dark .admin-info {
    color: var(--text);
}

/* --- 2. GLOBAL OVERRIDES --- */
body {
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

/* Force components to use variables */
.card, .tool-card, .job-card, .resume-card, .match-card-new, .resource-row, .modal-content, .sidebar {
  background-color: var(--card) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

/* Typography fix for cards */
h1, h2, h3, h4, h5, .job-title, .resume-name a, .admin-name {
  color: var(--text) !important;
}

p, .job-text, .resume-meta, .admin-email {
  color: var(--muted) !important;
}

/* Inputs */
input, select, textarea {
  background-color: var(--input-bg) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

/* Icon Containers (The square icons in Resources/Jobs) */
.tool-icon.blue, .job-icon, .resource-icon-box {
  background-color: var(--icon-bg) !important;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 45px;
    height: 45px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.2s;
}
.dark-mode-toggle:hover { transform: scale(1.1); }


* {
  box-sizing: border-box;
}

/* span{
  color: #000;
  font-weight: bold;
} */

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto;
}

/* --- Layout & Sidebar --- */
.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 16px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: fixed;
  
  /* 👇 YOU ARE MISSING THESE 3 LINES 👇 */
  width: 250px; 
  top: 0;
  left: 0;
  /* 👆 ADD THEM NOW 👆 */
  
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  padding: 10px 10px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #2563eb;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}

.admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8eefc;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #2563eb;
}

/* --- UPDATED SIDEBAR PROFILE STYLES --- */

.adminCard {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  
  /* CRITICAL FIXES FOR OVERFLOW */
  width: 100%; 
  max-width: 100%; 
  overflow: hidden; 
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Wrapper for Name & Email */
.admin-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  
  /* THIS IS THE MAGIC FIX */
  flex: 1;          /* Take up remaining space */
  min-width: 0;     /* Allow shrinking smaller than content */
}

.admin-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  
  /* Truncate Text */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-email {
  font-size: 11px;
  color: #6b7a99;
  margin-top: 2px;
  
  /* Truncate Text */
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text); /* 👈 FIXED: Uses theme color */
  text-decoration: none;
}

.nav a.active {
  background: var(--active);
  color: #2563eb;
}

.nav a:hover {
  background: #f2f6ff;
}

.sidebar-bottom {
  margin-top: auto;
  height: 5%;
  background-color: rgb(0, 0, 0);
  display: flex;
  justify-content: center;
  border-radius: 20px;
  align-items: center;
  margin-bottom: 3px;
}

.nav-link-signout {
  color: #6b7280;
  text-decoration: none;
}

/* --- Main Content & Typography --- */
.content {
  /* padding: 0 28px; */
  width: 100%;
  padding-right: 34px;
  margin-bottom: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-top: 25px
}

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

h1 {
  margin: 0 0 6px;
  font-size: 32px;
  letter-spacing: .2px;
}

.subtitle {
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 35px;
}

.card:hover {
  transform: rotateX('angle');
  box-shadow: 7px 10px 16px rgba(0, 0, 0, 0.2);
}

.card-header-flex {
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mb-8 {
  margin-top: 8px;
  margin-bottom: 8px;
}

/* --- Forms & Buttons --- */
input, textarea, select {
  /* width: 100%; */
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  margin-top: 20px;
  padding: 10px;
  border-radius: 10px;
}

.modal-body input, textarea, select{
  width: 100%;
}

.btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border: none;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(90%);
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.btn.loading {
  opacity: 0.7;
  cursor: wait;
  position: relative;
  padding-left: 40px;
}

.btn.loading::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* File Inputs */
input[type="file"] {
  color: var(--muted);
}

input[type="file"]::file-selector-button {
  font-weight: 700;
  color: var(--primary);
  background: #f0f6ff;
  border: none;
  border-right: 1px solid var(--border);
  padding: 10px 16px;
  margin: -10px 10px -10px -10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

input[type="file"]::file-selector-button:hover {
  background: #e6f0ff;
}

/* Specific Upload UI */
.upload-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.file-input {
  flex: 1;
}

.btn-upload-initial {
  background: #e0f2fe;
  border: 1px solid #b6e3fe;
  color: #0c4a6e;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: not-allowed;
  margin-top: 20px;
}

.upload-status-text {
  margin-top: 8px;
  color: #6b7280;
}

.file-name-display {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

/* --- Empty States --- */
.empty {
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 30px 20px;
  text-align: center;
  color: var(--muted);
  background: #fff;
}

.empty-icon {
  font-size: 48px;
  opacity: .4;
}

.empty-title {
  font-weight: 800;
  margin-top: 6px;
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--card);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

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

.modal-header h3 {
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
}

.modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
}

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

.modal-input-spaced {
  margin-top: 5px;
}

.modal-label-block {
  margin-top: 15px;
  display: block;
}

.modal-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 15px;
}

.modal-grid-full {
  grid-column: 1 / -1;
}

.modal-status-text {
  color: var(--muted);
  margin-right: auto;
}

.btn-secondary {
  background: var(--border);
  color: var(--muted);
}

.input-error {
  border-color: #ef4444 !important;
}


/* --- Lists (Resumes/Jobs/Matches) --- */
.resume-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
  margin-top: 19px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.resume-upload{
  font-weight:700;
  margin-bottom:8px; 
  display:flex; 
  align-items:center; 
  gap: 8px
}

.resume-card:hover, .job-card:hover, .match-card-new:hover {
  transform: translateY(-4px);
  box-shadow: 7px 10px 16px rgba(0, 0, 0, 0.3);
}

.resume-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}

.resume-info, .job-info, .match-card-info {
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
}


.resume-name, .job-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resume-meta, .job-meta, .match-card-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.resume-preview {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  
  /* Fix: Allow text to wrap to 2 lines on ALL devices */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal; /* Allows wrapping */
  overflow: hidden;
  text-overflow: ellipsis;
  
  width: 100%;
  line-height: 1.5; /* Adds spacing between lines */
}

.resume-delete, .job-action-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
}

.resume-delete {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #b91c1c;
}

.resume-delete:hover {
  background: #fee2e2;
}

.job-action-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.job-action-btn:hover {
  background: #e2e8f0;
}

.job-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-top: 12px;
  display: flex;
  gap: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.job-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: #16a34a;
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.job-section {
  margin-top: 12px;
}

.job-section h4 {
  margin: 0 0 4px 0;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.job-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Matching Section --- */
.match-select-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

.match-select {
  flex: 1;
  margin-top: 0;
}

#matchJobSelect{
  margin-bottom: 12px;
}

.btn-match-start {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-match-start span{
  color: white;
}

.match-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.match-results-header h3 {
  margin: 0;
}

.results-pill {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
}

.match-card-new {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-top: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.match-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.match-card-title {
  font-weight: 700;
  font-size: 16px;
}

.match-card-title a {
  color: var(--text);
  text-decoration: none;
}

.match-card-title a:hover {
  text-decoration: underline;
}
.match-score-badge {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  min-width: 70px;
}

.match-score-badge.low {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.match-score-badge.medium {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.match-score-badge.high {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.match-score-badge span {
  display: block;
  font-size: 11px;
  color: #fff;
  opacity: 0.8;
  font-weight: 600;
}

.match-summary-new {
  margin-top: 16px;
  background: var(--active);
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.match-progress-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-top: 16px;
}

.match-progress-item h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px 0;
}

.progress-bar {
  flex:1; 
  height:10px; 
  background:#eee; 
  border-radius:6px; 
  overflow:hidden; 
  position:relative; 
}

.progress-fill {
  height: 100%;
  width: 0%;;
  border-radius: 6px;
  background-color: #10b981; /* default fallback */
  transition: background-color 0.3s ease
}

.progress-fill.low { background: #ef4444; }
.progress-fill.medium { background: #f97316; }
.progress-fill.high { background: #16a34a; }

.match-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.match-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px 0;
}

.match-section .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.match-section .tag {
  background: #dcfce7;
  color: #14532d;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #dcfce7;
}

.match-section .keyword {
  background: #eef2ff;
  color: #312e81;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #e0e7ff;
}

.match-section ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* --- AI Assistant & Chat --- */
.grid2 {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 16px;
}
.card-nopad { padding: 0; }
.card-padded { padding: 20px; }

.chat-header {
  padding: 16px;
  border-bottom: 1px solid #e5e9f2;
  font-weight: 700;
  font-size: 18px;
}

.history-drawer {
  display: none;
  width: 260px;
  position: fixed;
  left: 16px;
  top: 120px;
  bottom: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
  overflow: auto;
  z-index: 110;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.btn-icon-transparent {
  background: transparent;
  border: none;
  cursor: pointer;
}

.btn-history-toggle {
  float: right;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
}

.history-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-footer {
  margin-top: 12px;
  text-align: center;
}

.btn-sm { padding: 8px 12px; }

.history-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
}

.history-item:hover {
  background: #f3f7ff;
  border-color: var(--border);
}

.history-item .title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}

.history-meta {
  font-size: 12px;
  color: var(--muted);
}

.history-item .avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

/* AI Loader */
.ai-loader {
  display: none;
  position: fixed;
  left: 50%;
  top: 90px;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(2, 6, 23, .3);
  z-index: 60;
  font-weight: 600;
}

.ml-8 { margin-left: 8px; }

/* Version Controls */
.version-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.version-tab {
  padding: 6px 14px;
  background: #e5e8f0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.version-tab.active {
  background: #2563eb;
  color: white;
}

.version-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 13px;
  color: #555;
}

.version-bar button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

.version-bar button:hover {
  color: #000;
}

/* Chat Box & Bubbles */
#chat-box {
  background: #f8faff;
  height: 420px;
  padding: 16px;
  overflow-y: auto;
  border-bottom: 1px solid #e5e9f2;
}

.msg-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 10px;
}

.msg-row.ai .avatar {
  content: url('https://cdn-icons-png.flaticon.com/512/4712/4712100.png');
}

.msg-row.user .avatar {
  content: url('https://cdn-icons-png.flaticon.com/512/847/847969.png');
}

/* --- AVATAR UPLOAD --- */
.avatar-wrapper {
    cursor: pointer;
    position: relative;
}

.avatar-wrapper:hover .admin-avatar {
    opacity: 0.8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

#avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Ensure the container keeps its shape */
.admin-avatar {
    width: 36px; 
    height: 36px;
    overflow: hidden; /* Clips the square image to a circle */
    display: flex;
    align-items: center;
    justify-content: center;
}

.bubble-user {
  background: #0b93f6;
  color: white;
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 70%;
  margin-left: auto;
  font-size: 15px;
  line-height: 1.45;
}

.bubble-ai {
  width: 100%;
  max-width: 100%;
  background: #ffffff;
  border-radius: 16px;
  padding: 22px 26px;
  margin: 14px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  line-height: 1.55 !important;
}

.bubble-ai p, .bubble-ai span, .bubble-ai li {
  color: #1f2937;
  font-size: 15px;
}

.bubble-ai h3, .bubble-ai h4 {
  margin: 8px 0 4px 0;
  font-weight: 700;
}

.bubble-ai ul, .bubble-ai ol {
  margin: 4px 0 4px 14px !important;
  padding-left: 0 !important;
}



.bubble-ai li, .bubble-ai p {
  margin: 4px 0 !important;
}

/* Chat Actions */
.bubble-actions {
  margin-top: 4px;
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.user-actions-group {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-right: 12px;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.msg-row.user:hover .user-actions-group { 
  opacity: 1; 
}

.user-action-icon {
  height: 30px;
  min-width: 30px;
  width: auto;
  border-radius: 15px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  overflow: hidden;
}


.user-action-icon:hover {
  background: #fff;
  color: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.user-action-icon.copied {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #059669 !important;
  padding: 0 10px !important;
  gap: 6px;
}

.edit-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 6px;
  padding: 8px;
  font-family: inherit;
  font-size: inherit;
  resize: vertical;
  outline: none;
}

.chat-timestamp {
  font-size: 11px;
  color: var(--muted);
  padding: 0 10px;
  margin-top: -6px;
  margin-bottom: 12px;
  flex-basis: 100%;
}

.msg-row.user .chat-timestamp { 
  text-align: right; 
}
.msg-row.ai .chat-timestamp { 
  padding-left: 42px; 
  text-align: left; 
}

.chat-sources {
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Chat Input */
.chat-input-area {
  padding: 14px;
  border-top: 1px solid #e5e9f2;
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input-field {
  flex: 1;
  background: #fff;
  border: 1px solid #dbe2fe;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
}

.btn-send {
  padding: 0 18px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
}

/* Chat Resume Card */
.chat-resume-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 16px;
  margin: 8px 0;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  width: auto;
  max-width: 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-resume-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #2563eb;
}

.chat-resume-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.chat-resume-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 14px;
}

/* Typing Dots */
.typing-dots {
  width: 32px;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: #9ca3af;
  opacity: 0.25;
  transform:translateY(0);
  animation: dot 1s infinite linear;
}
.typing-dots span:nth-child(2){ animation-delay: .12s }
.typing-dots span:nth-child(3){ animation-delay: .24s }
@keyframes dot {
  0% { opacity: .25; transform: translateY(0) scale(1); }
  50% { opacity: 1; transform: translateY(-6px) scale(.95); }
  100% { opacity: .25; transform: translateY(0) scale(1); }
}


/* Code Block Styling */
.code-wrapper {
  margin: 12px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #333;
  background: #1e1e1e;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #2d2d2d;
  padding: 8px 12px;
  color: #a1a1aa;
  font-size: 12px;
  font-family: sans-serif;
  border-bottom: 1px solid #333;
  user-select: none;
}

.copy-code-btn {
  background: transparent;
  border: none;
  color: #b0b0b0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  transition: color 0.2s;
}

.copy-code-btn:hover { 
  color: #fff; 
}

.bubble-ai pre {
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 16px;
  color: #e5e5e5;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble-ai code {
  background: #e0e7ff;
  padding: 2px 4px;
  border-radius: 4px;
  color: #ef4444;
  font-family: monospace;
}

.bubble-ai pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* --- Context Panel --- */
.context-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.context-subtitle {
  color: #6b7280;
  margin-bottom: 16px;
}

.context-label {
  font-weight: 600;
  margin-bottom: 6px;
}

.select-full {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #dbe2fe;
}

.context-box-general {
  text-align: center;
  margin: 20px 0;
  padding: 8px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}

.emoji-lg {
  font-size: 40px;
  margin-bottom: 10px;
}

.context-box-title {
  font-weight: 700;
  color: #000;
  margin-bottom: 6px;
}

.context-box-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.quick-action-title {
  margin-top: 24px;
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text);
}

#multiJobSelect{
  color: #000;
}

.quick-action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-action-row {
  display: flex;
  gap: 8px;
}

.btn-quick-action {
  flex: 1;
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-icon-copy {
  width: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #6b7a99;
}

.btn-quick-action-blue {
  flex: 1;
  background: #eef3ff;
  color: #1e3a8a;
  border: 1px solid #dbe2fe;
  font-weight: 600;
  text-align: left;
}

.btn-icon-copy-blue {
  width: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #dbe2fe;
  color: #6b7a99;
}

/* --- Multi Job Select --- */
.multi-job-container {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: #fdfdfd;
}

.multi-job-item {
  margin-bottom: 5px;
}

/* --- Settings & Admin --- */
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-24 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 4px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 24px;
  border-radius: 16px;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 140px;
  transition: transform 0.2s;
}
.stat-card:hover {
  transform: translateY(-3px);
}

.stat-card.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.stat-card.green {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.stat-card.orange {
background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
}

.stat-title {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 42px;
  font-weight: 800;
}

.settings-header {
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.info-box {
  background-color: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #1e40af;
  font-size: 14px;
  line-height: 1.5;
  margin: 16px 0;
}

.info-box svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.key-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  margin-left: 10px;
}
.key-status.default { 
  background: #e0f2fe; color: #0284c7; 
}
.key-status.custom { 
  background: #dcfce7; color: #16a34a; 
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.settings-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  margin-top: 15px;
}

.settings-select {
  margin-top: 5px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.settings-input {
  margin-top: 5px;
}

.settings-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.settings-actions {
  margin-top: 20px;
}

/* Toast Notification */
.toast {
  display: none;
  position: fixed;
  top: 24px;
  right: 28px;
  padding: 12px 18px;
  background-color: #22c55e;
  color: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease, top 0.3s ease;
}

.toast.show {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 1;
  top: 36px;
}

.toast.error {
  background-color: #ef4444;
}

.pill {
  display: inline-block;
  background: #eef2ff;
  color: #3b5bdb;
  border: 1px solid #dbe2fe;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.footer {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  color: #6b7280;
  box-shadow: var(--shadow);
}

/* Utility */
.pill-admin {
  display: inline-block;
  background: #eef2ff;
  color: #3b5bdb;
  border: 1px solid #dbe2fe;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.sign-out-link {
  /* background: linear-gradient(135deg, var(--primary), var(--primary-2)); */
  /* background-color: red; */
  border: none;
  color: #fff;
  padding: 10px 16px;
  /* border-radius: 10px; */
  font-weight: 700;
  cursor: pointer;
  /* color: #6b7280; */
  text-decoration: none;
}

/* --- Missing Layout Styles --- */
.grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.kpi {
  display: flex;
  gap: 12px;
}
    
.kpi .tile {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

/* --- Match Card UI --- */
.match-card {
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}

.match-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.match-badge {
  background-color: #faad14;
  color: #fff !important;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 12px;
  min-width: 64px;
  text-align: center;
  transition: background-color 0.3s ease;
}

.match-summary {
  margin-top: 12px;
  background: #f7fbff;
  border: 1px solid #e6f0ff;
  padding: 14px;
  border-radius: 8px;
  color: #2b3b4a;
}

.match-rank {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: #ffedd5;
  color: #9a3412;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

/* --- Progress Bars & Tags --- */
.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.progress-label {
  min-width: 48px;
  text-align: right;
  font-weight: 700;
  color: #0b1220;
}

.progress-bar { 
  width: 100%;
  height: 8px; 
  background: #e5e9f2; 
  border-radius: 4px; 
  overflow:hidden; 
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: #e6fff0;
  color: #0b6b46;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid #dff6e9;
}

.keyword {
  background: #ebf4ff;
  color: #164ea3;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid #dbeafe;
}

.small-muted {
  color: #6b7a99;
  font-size: 13px;
}

/* --- Legacy Chat Styles --- */
.chat-user {
  background: #2563eb;
  color: white;
  padding: 10px 14px;
  margin: 8px 0;
  border-radius: 12px;
  max-width: 70%;
  margin-left: auto;
  text-align: left;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.chat-ai {
  background: #eef6ff;
  color: #1e293b;
  padding: 10px 14px;
  margin: 8px 0;
  border-radius: 12px;
  max-width: 80%;
  margin-right: auto;
  text-align: left;
  border: 1px solid #dbe2fe;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
}

.chat-message {
  white-space: normal !important;
  line-height: 1.25;
  font-size: 14px;
}

/* --- Bubble Formatting Fixes --- */
.bubble-ai, .bubble-user {
  line-height: 1.25 !important;
}

.bubble-ai p, .bubble-user p,
.bubble-ai li, .bubble-user li {
  margin-top: 4px !important;
  margin-bottom: 4px !important;
}

.bubble-ai ul, .bubble-user ul,
.bubble-ai ol, .bubble-user ol {
  margin: 6px 0 !important;
  padding-left: 18px !important;
}

/* --- Status Colors (Critical for JS) --- */
.bar-red { background-color: #ff4d4f !important; }
.bar-yellow { background-color: #faad14 !important; }
.bar-green { background-color: #52c41a !important; }
.score-red { background-color: #ff4d4f !important; }
.score-yellow { background-color: #faad14 !important; }
.score-green { background-color: #52c41a !important; }

/* --- Version Panel --- */
.version-panel { display: none; }
.version-panel.active { display: block; }

/* --- User Edit Button --- */
.user-edit-btn:hover {
  background: #000000;
  color: #ff0000;
  border-color: #2563eb;
}
.bubble-user:hover .user-edit-btn { display: inline-block; }

/* --- Input Errors --- */
.input-error { border-color: #ef4444 !important; }

/* --- API Link --- */
.api-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}
.api-link:hover { text-decoration: underline; }
@keyframes spin { 0% { transform: translateY(-50%) rotate(0deg); } 100% { transform: translateY(-50%) rotate(360deg); } }




/* =========================================
   MOBILE RESPONSIVENESS & COMPONENT FIXES
   ========================================= */

/* --- 1. READ MORE TOGGLE (Global) --- */
.job-text.expanded {
  -webkit-line-clamp: unset !important;
  display: block !important;
  overflow: visible !important;
}

.read-more-btn {
  background: transparent;
  border: none;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  padding: 0;
}
.read-more-btn:hover { text-decoration: underline; }

/* --- 2. TABLET & MOBILE STYLES (Max Width 900px) --- */
@media (max-width: 900px) {
  
  /* A. LAYOUT & SIDEBAR */
  .layout {
    display: block; /* Disable grid layout */
    position: relative;
    overflow-x: hidden;
  }

  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    z-index: 1000;
    transform: translateX(-100%); /* Hide off-screen */
    transition: transform 0.3s ease;
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
  }
  
  .sidebar.open { transform: translateX(0); } /* Slide in */

  .mobile-header {
    display: flex !important; /* Show hamburger header */
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    z-index: 900;
  }

  .content {
    width: 100%;
    padding: 16px;
    margin-left: 0;
  }

  /* B. GRID STACKING (Force 1 Column) */
  .grid2, .grid3, .settings-grid, .modal-grid-2, .stats-grid, .match-card-top {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* C. JOB CARDS (Line-by-line Details) */
  .job-details-grid {
    grid-template-columns: 1fr !important; /* Stack vertically */
    gap: 12px !important;
  }
  
  /* Allow text to wrap fully on mobile so "Remote..." doesn't happen */
  .job-details-grid .job-text {
    -webkit-line-clamp: unset !important;
    white-space: normal !important;
  }

  /* D. MATCH CARDS (Stacking) */
  .match-progress-grid, .match-section-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  
  /* E. CHAT INTERFACE (Context on Top) */
  /* Move the Context Panel (2nd child) to the top */
  #view-assistant .grid2 .card:nth-child(2) { order: -1; }
  #view-assistant .grid2 .card:nth-child(1) { order: 1; }
  
  /* F. UTILITIES */
  .topbar { 
      flex-direction: column; 
      align-items: flex-start; 
      gap: 12px; 
  }

  .topbar-actions {
      /* 👇 MOVES BUTTONS TO THE TOP */
      order: -1; 
      
      width: 100%; 
      
      /* 👇 Spreads them out: Credits on Left, Upgrade on Right */
      justify-content: space-between; 
      
      /* Adds a nice separator line */
      margin-bottom: 15px;
      padding-bottom: 0px;
      border-bottom: 1px solid var(--border);
  }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  .history-drawer { top: 0; z-index: 1100; }
  /* 1. Force Pricing Cards to Stack */
  .pricing-grid {
    grid-template-columns: 1fr !important; /* 1 Column instead of 2 */
    gap: 20px !important;
  }

  /* 2. Reduce Huge Padding in Modal */
  .modal-body {
    padding: 20px !important; /* Override the inline 40px */
  }
  
  .modal-header {
    padding: 20px !important; /* Override the inline 30px */
  }

  /* 3. Make the Modal Width Safe */
  .modal-content {
    width: 95% !important;
    margin: 10px auto;
    max-height: 90vh; /* Ensure it fits on screen */
    overflow-y: auto; /* Scroll if too tall */
  }
  
  /* 1. Keep the Block Layout you like (Icon top, Title below) */
  .job-card {
    display: block !important;
    position: relative;
    padding-top: 20px; 
    padding-bottom: 20px; /* Standard bottom padding */
  }

  /* 2. Icon stays at the top-left */
  .job-icon {
    display: inline-flex;
    margin-bottom: 12px;
  }

  /* 3. Content stays full width (looks pretty) */
  .job-info {
    width: 100%;
    margin-bottom: 0;
  }

  /* 4. BUTTONS: Move from Bottom to Top-Right */
  .job-card > div:last-child {
    position: absolute;
    top: 20px;           /* <--- MOVED TO TOP */
    right: 20px;         /* <--- PINNED TO RIGHT */
    bottom: auto !important;
    display: flex !important;
    flex-direction: row !important; /* Side-by-Side */
    gap: 8px !important;
    width: auto !important;
    margin: 0 !important;
  }
  
  /* 1. Shrink the huge padding on Resume Cards for mobile */
  .resume-card {
    padding: 16px !important; /* Reduced from 30px */
    gap: 12px !important;     /* Reduced gap */
  }

  /* 2. Allow text to wrap so it doesn't force the card wide */
  .resume-preview {
    white-space: normal !important; 
    display: -webkit-box !important;
    -webkit-line-clamp: 2;          
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: auto;                   
  }

  /* 3. Ensure the filename truncates */
  .resume-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  
  /* 4. Force the text container to shrink if needed */
  .resume-info {
    min-width: 0; 
    flex: 1;
  }
  /* 1. Push the entire page content down so it clears the white header */
  .content {
    padding-top: 0 !important; /* 60px Header + 50px Spacing */
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* 2. Fix the "Credits" and "Upgrade" buttons */
  .topbar-actions {
      order: -1 !important; /* Force to top */
      width: 100% !important;
      justify-content: space-between !important;
      margin-bottom: -10px !important;
      padding-bottom: 15px !important;
      border-bottom: 1px solid var(--border) !important;
      margin-top: 0 !important;
  }

  /* 3. Fix the Red/Green Toast Notifications */
  /* Currently, they hide behind the header. This pushes them down. */
  .toast {
    top: 80px !important; /* Below the 60px header */
    right: 50% !important;
    transform: translateX(50%) !important; /* Center horizontally */
    width: 90% !important;
    justify-content: center !important;
    z-index: 2000 !important; /* Ensure it sits ON TOP of everything */
  }
  
}

/* Desktop Overrides */
.mobile-header { display: none; }
.sidebar-overlay {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}
.sidebar-overlay.show { display: block; }

/* In styles.css - Add at the bottom */

.tool-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  border-color: var(--primary);
}

.tool-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.tool-icon.blue { background: #eff6ff; color: #2563eb; }
.tool-icon.purple { background: #f3e8ff; color: #9333ea; }
.tool-icon.orange { background: #fff7ed; color: #ea580c; }

.tool-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.tool-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* Highlight a shared job */
.job-card.highlight {
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.mobile-header {
    z-index: 1001; /* Ensure this is higher than the sidebar */
}

.radio-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: 0.2s;
    background: white;
}
.radio-card:hover { border-color: var(--primary); }
.radio-card.active {
    border: 2px solid var(--primary);
    background: #eff6ff;
}
.radio-card h4 { margin: 0 0 4px 0; font-size: 14px; color: var(--primary); }



/* =============================================
   ✨ FINAL UI REPAIRS (Paste at bottom)
   ============================================= */

/* 1. RESTORE UPGRADE CARDS */
.pricing-card {
    background-color: var(--card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px !important;
    padding: 30px !important;
    text-align: center !important;
    transition: transform 0.2s;
    margin-bottom: 0 !important; /* Fix spacing */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.pricing-card.pro {
    border: 2px solid #2563eb !important;
    transform: scale(1.05); /* Make it pop */
    position: relative;
    z-index: 10;
}

/* 2. FIX CHAT BUBBLES (Text Visibility) */
.bubble-ai {
    background-color: var(--card) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

.bubble-ai p, .bubble-ai span, .bubble-ai li, .bubble-ai strong {
    color: var(--text) !important; /* Force text to be visible */
}

/* 3. FIX MODAL HEADERS (Resume Suggestion etc) */
.modal-header {
    background-color: var(--bg) !important; /* Matches body background */
    border-bottom: 1px solid var(--border) !important;
}

.modal-header h3 {
    color: var(--text) !important;
}

/* 4. FIX CHAT INPUT AREA */
.chat-input-area {
    background-color: var(--card) !important;
    border-top: 1px solid var(--border) !important;
}

/* 5. FIX HISTORY POPUP */
.history-item:hover {
    background-color: var(--active) !important;
}

/* =============================================
   🔧 MATCHING CARD FIXES (Paste at bottom)
   ============================================= */

/* 1. Force the Radio Cards to adapt to Dark Mode */
.radio-card {
    background-color: var(--card) !important; /* Becomes Dark Gray in Dark Mode */
    border-color: var(--border) !important;
}

/* 2. Fix the "Active" State (Selected Card) */
.radio-card.active {
    background-color: var(--active) !important; /* Becomes Dark Blue/Gray in Dark Mode */
    border-color: var(--primary) !important;
}

/* 3. Fix the Title Text Color */
.radio-card h4 {
    color: var(--primary) !important; /* Force Title to be Blue (Visible on dark & light) */
    margin-bottom: 4px;
}

/* 4. Fix the Description Text Color */
.radio-card p {
    color: var(--muted) !important; /* Force Description to be Gray */
    margin: 0;
    font-size: 13px;
}
/* Fix Chat Box Background in Dark Mode */
#chat-box {
    background-color: var(--bg) !important; /* Forces it to be Dark Navy */
    border-color: var(--border) !important;
}
.job-icon {
    background-color: #16a34a !important; /* Green */
    color: #ffffff !important;            /* White Icon */
}

/* Ensure the SVG inside uses the white color */
.job-icon svg {
    stroke: #ffffff !important;
}

/* --- CUSTOM SEARCHABLE DROPDOWN --- */
.custom-dropdown-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

/* The box you click */
.custom-select-trigger {
    background: var(--input-bg);
    border: 1px solid var(--border);
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text);
    transition: 0.2s;
}
.custom-select-trigger:hover { border-color: var(--primary); }

/* The dropdown menu (Hidden by default) */
.custom-dropdown-menu {
    display: none; /* Hidden */
    position: absolute;
    top: 105%; /* Just below the trigger */
    left: 0;
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow: hidden;
}

/* Sticky Search Bar inside Dropdown */
.dropdown-search-box {
    padding: 10px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.dropdown-search-box input {
    margin: 0;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

/* The Scrollable List */
.custom-options-list {
    max-height: 250px; /* Show approx 4-5 items */
    overflow-y: auto;  /* Enable Scroll */
}

/* Individual Option */
.custom-option {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: 0.1s;
}
.custom-option:hover { background: var(--active); }
.custom-option:last-child { border-bottom: none; }

.option-title { font-weight: 600; color: var(--text); font-size: 14px; }
.option-company { font-size: 12px; color: var(--muted); }