:root{
  --brand-blue:#345896;
  --brand-blue-2:#436dae;
  --brand-orange:#f49d37;
  --brand-cyan:#61c7f2;

  --text:#e9f0ff;
  --muted:#9fb1d1;
  --border:rgba(255,255,255,.10);
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --radius:18px;

  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

*{ box-sizing:border-box; }

body.app{
  margin:0;
  min-height:100vh;
  background: radial-gradient(1200px 600px at 20% 0%, rgba(97,199,242,.12), transparent 50%),
              radial-gradient(1000px 600px at 100% 10%, rgba(244,157,55,.10), transparent 45%),
              linear-gradient(180deg, #050812, #070b14);
  color:var(--text);
}

/* HEADER */
.app-header{
  position:sticky;
  top:0;
  z-index:10;
  padding:14px 18px;
  border-bottom:1px solid var(--border);
  background: rgba(7,11,20,.72);
  backdrop-filter: blur(10px);
}

.brand{ display:flex; align-items:center; gap:14px; }
.brand-logo{ height:42px; width:auto; }
.brand-title{ font-weight:800; letter-spacing:.2px; }
.brand-sub{ color:var(--muted); font-size:13px; margin-top:2px; }

/* ✅ IMPORTANT: SINGLE COLUMN LAYOUT (NO GRID) */
.app-main{
  width:100%;
  max-width:none;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:12px;

  /* full viewport minus header */
  height: calc(100vh - 73px);
  min-height: 0;
}

/* TOP TOOLBAR FULL WIDTH */
.toolbar{
  width:100%;
  max-width:none;
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(16,31,55,.82), rgba(11,18,32,.82));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:12px;
}

.toolbar-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
  flex-wrap:wrap;
}

.toolbar-title{ font-weight:900; }
.toolbar-hint{ color:var(--muted); font-size:12px; margin-top:2px; }

.toolbar-actions{ display:flex; gap:8px; flex:0 0 auto; }

.toolbar-groups{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  width:100%;
}

.group{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:14px;
  background: rgba(255,255,255,.04);
}

.group.grow{
  flex: 1 1 420px;     /* ✅ makes quick searches expand instead of dropping left */
  min-width: 320px;
}

.glabel{
  min-width:72px;
  color:var(--muted);
  font-size:12px;
  padding-top:6px;
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  width:100%;
}

.chip, .pill{
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color:var(--text);
  padding:7px 10px;
  border-radius:999px;
  cursor:pointer;
  font-size:12px;
  line-height:1;
  user-select:none;
  white-space:nowrap;
}

.chip.active{
  border-color: rgba(97,199,242,.55);
  background: rgba(97,199,242,.12);
}

.chip.accent{
  border-color: rgba(244,157,55,.60);
  background: rgba(244,157,55,.18);
  font-weight:900;
}

.chip.secondary{ opacity:.92; }

/* CHAT PANEL FULL WIDTH */
.chat-panel{
  width:100%;
  max-width:none;
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(15,26,46,.92), rgba(11,18,32,.92));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;

  /* ✅ fill remaining height */
  flex: 1;
  min-height: 0;
}

.chat-body{
  padding:14px;
  overflow:auto;
  flex:1;
  min-height:0;
}

.msg{ display:flex; margin:10px 0; }
.msg.user{ justify-content:flex-end; }
.msg.bot{ justify-content:flex-start; }

.bubble{
  max-width: 1200px;
  width: fit-content;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  line-height:1.35;
  font-size:14px;
}

.msg.user .bubble{
  background: linear-gradient(135deg, rgba(67,109,174,.18), rgba(52,88,150,.22));
  color:var(--text);
}

.msg.bot .bubble{
  background: rgba(255,255,255,.06);
  color:var(--text);
}

/* RESULTS */
.results{ margin-top:10px; display:grid; gap:12px; }

.job-card{
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(16,31,55,.88), rgba(15,26,46,.78));
  border-radius: 16px;
  padding:14px;
}

.job-title{ font-weight:850; font-size:16px; margin:0; }
.job-company, .job-meta{ color:var(--muted); font-size:13px; margin-top:5px; }

.badges{ display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.badge{
  font-size:11.5px;
  color:var(--text);
  padding:5px 9px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
}

.skills{ display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.skill{
  font-size:11.5px;
  color:var(--text);
  padding:5px 9px;
  border-radius:10px;
  border:1px dashed rgba(255,255,255,.18);
  background: rgba(255,255,255,.04);
}

.apply-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:12px;
}

.apply-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(244,157,55,.55);
  background: linear-gradient(135deg, rgba(244,157,55,.95), rgba(244,157,55,.72));
  color:#1a1207;
  font-weight:900;
  text-decoration:none;
  cursor:pointer;
  white-space:nowrap;
}

.apply-note{ color:var(--muted); font-size:12px; }

/* FOOTER */
.chat-footer{
  padding:12px;
  border-top:1px solid var(--border);
  background: rgba(7,11,20,.45);
}

#chatForm{ display:flex; gap:10px; }
#chatInput{
  flex:1;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color:var(--text);
  border-radius: 14px;
  padding:14px 12px;
  outline:none;
}

#chatSend{
  border:1px solid rgba(97,199,242,.35);
  background: linear-gradient(135deg, rgba(67,109,174,.28), rgba(52,88,150,.30));
  color:var(--text);
  border-radius: 14px;
  padding:14px 16px;
  cursor:pointer;
  font-weight:800;
}

.hint{ color:var(--muted); font-size:12px; margin-top:8px; }

/* MOBILE */
@media (max-width: 980px){
  .app-main{ height:auto; }
  .group{ width:100%; }
}

/* ====== Search Bar (Upgraded) ====== */
#chatForm{
  display:flex;
  gap:12px;
  align-items:center;
}

#chatInput{
  flex:1;
  border:1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.05));
  color:var(--text);
  border-radius: 16px;
  padding:16px 16px;
  outline:none;
  font-size:14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

#chatInput::placeholder{
  color: rgba(159,177,209,.85);
}

#chatInput:focus{
  border-color: rgba(97,199,242,.55);
  box-shadow: 0 0 0 4px rgba(97,199,242,.14), 0 12px 34px rgba(0,0,0,.35);
  transform: translateY(-1px);
}

/* Send button: more attention grabbing */
#chatSend{
  border: 1px solid rgba(244,157,55,.55);
  background: linear-gradient(135deg, rgba(244,157,55,.98), rgba(244,157,55,.70));
  color: #1a1207;
  border-radius: 16px;
  padding: 15px 18px;
  cursor:pointer;
  font-weight: 900;
  letter-spacing: .2px;
  box-shadow: 0 10px 26px rgba(244,157,55,.18);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  white-space:nowrap;
}

#chatSend:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 12px 30px rgba(244,157,55,.22);
}

#chatSend:active{
  transform: translateY(0px);
  box-shadow: 0 8px 20px rgba(244,157,55,.16);
}

/* Optional: add subtle pulse glow when idle */
.chat-footer.idle #chatSend{
  animation: chPulse 1.8s ease-in-out infinite;
}
@keyframes chPulse{
  0%,100%{ box-shadow: 0 10px 26px rgba(244,157,55,.14); }
  50%{ box-shadow: 0 14px 34px rgba(244,157,55,.26); }
}