.jf-assistant-root {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #eaf3ff;
}

.jf-assistant-launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: rgba(15, 23, 42, 0.84);
  color: #f8fafc;
  border-radius: 999px;
  padding: 10px 14px 10px 10px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(16px);
  cursor: pointer;
}

.jf-assistant-launcher strong,
.jf-assistant-head strong { display: block; font-size: 13px; line-height: 1.15; }
.jf-assistant-launcher small,
.jf-assistant-head small { display: block; color: rgba(226, 232, 240, 0.72); font-size: 11px; }

.jf-assistant-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.55);
  background: radial-gradient(circle at 35% 25%, rgba(236, 254, 255, 0.95), rgba(59, 130, 246, 0.72) 42%, rgba(14, 165, 233, 0.24));
  font-size: 12px;
  font-weight: 800;
  color: #082f49;
}

.jf-assistant-root.is-speaking .jf-assistant-avatar {
  box-shadow: 0 0 0 5px rgba(56, 189, 248, 0.16), 0 0 26px rgba(56, 189, 248, 0.55);
}

.jf-assistant-panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 112px));
  display: none;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(12, 28, 50, 0.94));
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(22px);
}

.jf-assistant-panel.is-open { display: flex; flex-direction: column; }

.jf-assistant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.jf-assistant-head button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  cursor: pointer;
}

.jf-assistant-messages {
  flex: 1;
  overflow: auto;
  padding: 14px 14px 8px;
}

.jf-assistant-message {
  max-width: 88%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.jf-assistant-message.is-ai {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.jf-assistant-message.is-user {
  margin-left: auto;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.jf-assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 12px;
}

.jf-assistant-action,
.jf-assistant-form button,
.jf-assistant-tools button {
  border: 1px solid rgba(125, 211, 252, 0.34);
  background: rgba(14, 165, 233, 0.12);
  color: #e0f2fe;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 12px;
  cursor: pointer;
}

.jf-assistant-form {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.jf-assistant-form input {
  min-width: 0;
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  padding: 9px 12px;
  outline: none;
}

.jf-assistant-form input::placeholder { color: rgba(226, 232, 240, 0.56); }

.jf-assistant-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px 14px;
  color: rgba(226, 232, 240, 0.66);
  font-size: 11px;
}

.jf-assistant-tools span { flex: 1; text-align: right; }

@media (max-width: 640px) {
  .jf-assistant-root { right: 12px; bottom: 12px; }
  .jf-assistant-panel { bottom: 62px; width: calc(100vw - 24px); height: min(580px, calc(100vh - 88px)); }
}

.jf-assistant-context {
  margin: 12px 14px 0;
  padding: 11px 12px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 18px;
  background: rgba(14, 165, 233, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.jf-assistant-context strong {
  display: block;
  margin-bottom: 5px;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.25;
}

.jf-assistant-context p {
  margin: 0;
  color: rgba(226, 232, 240, 0.74);
  font-size: 11px;
  line-height: 1.4;
}

.jf-assistant-context div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.jf-assistant-context span {
  display: inline-flex;
  gap: 4px;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(226, 232, 240, 0.78);
  font-size: 10px;
  white-space: nowrap;
}

.jf-assistant-context b {
  color: rgba(186, 230, 253, 0.9);
  font-weight: 700;
}

.jf-assistant-form-draft {
  margin: 0 14px 12px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.96), rgba(255, 255, 255, 0.98));
  padding: 14px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.jf-assistant-form-draft strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.jf-assistant-form-draft p {
  margin: 6px 0 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
}

.jf-assistant-draft-rows {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 190px;
  overflow: auto;
}

.jf-assistant-draft-rows div {
  display: grid;
  gap: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  padding: 8px 10px;
}

.jf-assistant-draft-rows b {
  color: #4f46e5;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.jf-assistant-draft-rows span {
  color: #0f172a;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.jf-assistant-draft-missing {
  color: #b45309 !important;
  font-weight: 800;
}

.jf-assistant-draft-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.jf-assistant-draft-buttons button {
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
}

#jf-assistant-apply-draft {
  background: #4f46e5;
  color: #fff;
}

#jf-assistant-close-draft {
  background: #e2e8f0;
  color: #334155;
}

.jf-assistant-field-applied {
  outline: 3px solid rgba(79, 70, 229, 0.28);
  outline-offset: 6px;
  border-radius: 24px;
}

.jf-assistant-draft-row.is-long span {
  max-height: 150px;
  overflow: auto;
  display: block;
}

.jf-assistant-draft-meta {
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 700;
}

.jf-assistant-draft-buttons {
  flex-wrap: wrap;
}

#jf-assistant-apply-description,
#jf-assistant-apply-requirements {
  background: #dbeafe;
  color: #1e3a8a;
}

#jf-assistant-apply-summary,
#jf-assistant-apply-skills {
  background: #dcfce7;
  color: #166534;
}

.jf-assistant-verify-box {
  margin-top: 12px;
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 16px;
  background: rgba(240, 249, 255, 0.86);
  padding: 10px;
}

.jf-assistant-verify-box > b {
  color: #075985;
  font-size: 12px;
}

.jf-assistant-verify-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  max-height: 190px;
  overflow: auto;
}

.jf-assistant-verify-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: start;
  border-radius: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.jf-assistant-verify-row.is-ok {
  border: 1px solid rgba(22, 163, 74, 0.16);
}

.jf-assistant-verify-row.is-missing {
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.jf-assistant-verify-dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.jf-assistant-verify-row.is-ok .jf-assistant-verify-dot {
  background: #dcfce7;
  color: #166534;
}

.jf-assistant-verify-row.is-missing .jf-assistant-verify-dot {
  background: #fef3c7;
  color: #92400e;
}

.jf-assistant-verify-row b {
  display: block;
  color: #0f172a;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.jf-assistant-verify-row small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.35;
}

#jf-assistant-apply-company-basics {
  background: #e0f2fe;
  color: #075985;
}

.jf-assistant-language {
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.84);
  color: #e5eefc;
  padding: 0 10px;
  font-size: 12px;
  max-width: 110px;
}
