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

:root {
  --bg:           #f4f4f9;
  --surface:      #ffffff;
  --surface2:     #f0f0f6;
  --border:       #e2e2ec;
  --accent:       #5b52e8;
  --accent-dim:   rgba(91,82,232,.10);
  --accent-hover: #4a42d0;
  --accent-glow:  rgba(91,82,232,.18);
  --green:        #16a34a;
  --green-dim:    rgba(22,163,74,.10);
  --red:          #dc2626;
  --red-dim:      rgba(220,38,38,.08);
  --blue:         #2563eb;
  --blue-dim:     rgba(37,99,235,.08);
  --yellow:       #d97706;
  --text:         #111118;
  --text-muted:   #5a5a72;
  --text-dim:     #9a9ab0;
  --radius:       10px;
  --shadow:       0 2px 12px rgba(0,0,0,.07);
  --shadow-md:    0 4px 20px rgba(0,0,0,.10);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

.hidden { display: none !important; }

/* ── SETUP SCREEN ── */
#setupScreen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 32px 24px;
  gap: 16px;
  text-align: center;
}
.setup-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.3px;
  margin-bottom: 8px;
}
.setup-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.setup-title { font-size: 16px; font-weight: 700; }
.setup-desc  { font-size: 12px; color: var(--text-muted); max-width: 280px; line-height: 1.6; }
.setup-field {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 320px;
}
.setup-field input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  outline: none;
  color: var(--text);
  font-family: monospace;
  letter-spacing: .5px;
}
.setup-field input:focus { border-color: var(--accent); }
#saveKeyBtn {
  padding: 10px 18px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
#saveKeyBtn:hover { background: var(--accent-hover); }
.setup-hint { font-size: 11px; color: var(--text-dim); }
.setup-hint a { color: var(--accent); text-decoration: none; }

/* ── HAMBURGER BUTTON ── */
.hamburger-btn {
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; cursor: pointer;
  transition: all .15s; flex-shrink: 0;
}
.hamburger-btn span {
  display: block; width: 14px; height: 1.5px;
  background: var(--text-muted); border-radius: 2px;
  transition: all .2s;
}
.hamburger-btn:hover { border-color: var(--accent); }
.hamburger-btn:hover span { background: var(--accent); }
.hamburger-btn.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ── HAMBURGER DROPDOWN ── */
.hamburger-menu {
  display: none;
  position: absolute;
  top: 53px; right: 10px;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  z-index: 200;
  overflow: hidden;
  animation: menu-in .15s ease;
}
.hamburger-menu.open { display: block; }
@keyframes menu-in { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

.hm-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 11px 16px;
  background: transparent; border: none;
  font-size: 13px; font-weight: 500;
  color: var(--text); cursor: pointer;
  transition: background .12s;
  text-decoration: none;
}
.hm-item:hover { background: var(--surface2); }
.hm-item svg { color: var(--text-muted); flex-shrink: 0; }

.hm-divider {
  height: 1px; background: var(--border); margin: 2px 0;
}

/* ── APP LAYOUT ── */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── HEADER ── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  gap: 8px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 50;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -.3px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}
.logo:hover { opacity: .85; }
.logo-img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.header-right { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }

.status-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  border-radius: 20px;
  padding: 3px 9px;
  border: 1px solid;
  white-space: nowrap;
  transition: all .3s;
}
.status-badge.ready        { color: var(--green);      background: var(--green-dim);            border-color: rgba(34,197,94,.25); }
.status-badge.listening    { color: var(--red);        background: var(--red-dim);              border-color: rgba(239,68,68,.35); }
.status-badge.transcribing { color: var(--blue);       background: var(--blue-dim);             border-color: rgba(96,165,250,.3); }
.status-badge.thinking     { color: var(--yellow);     background: rgba(245,158,11,.1);         border-color: rgba(245,158,11,.3); }
.status-badge.connecting   { color: var(--text-muted); background: var(--surface2);             border-color: var(--border); }
.status-dot {
  width: 5px; height: 5px;
  background: currentColor;
  border-radius: 50%;
  animation: blink 1.5s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.icon-btn {
  width: 28px; height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

.profile-badge {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(108,99,255,.3);
  font-weight: 600;
  white-space: nowrap;
}
.profile-badge.visible { display: flex; }

.clear-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.clear-btn:hover { border-color: var(--red); color: var(--red); }

/* ── REALTIME BAR ── */
#realtimeBar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid;
  font-size: 12px;
  flex-shrink: 0;
}
#realtimeBar.connecting    { display:flex; background:var(--surface2);       border-color:var(--border); }
#realtimeBar.listening     { display:flex; background:var(--red-dim);         border-color:rgba(220,38,38,.2); }
#realtimeBar.transcribing  { display:flex; background:var(--blue-dim);        border-color:rgba(37,99,235,.2); }
#realtimeBar.zoom-listening{ display:flex; background:rgba(37,99,235,.06);    border-color:rgba(37,99,235,.2); }

.waveform { display:flex; align-items:center; gap:2px; height:16px; flex-shrink:0; }
.waveform span { width:2.5px; border-radius:2px; animation: wave .7s ease-in-out infinite alternate; }
.listening     .waveform span { background: var(--red); }
.transcribing  .waveform span { background: var(--blue); }
.zoom-listening .waveform span { background: var(--blue); }
.waveform span:nth-child(1){animation-delay:0s;  height:6px}
.waveform span:nth-child(2){animation-delay:.12s;height:14px}
.waveform span:nth-child(3){animation-delay:.24s;height:8px}
.waveform span:nth-child(4){animation-delay:.06s;height:16px}
.waveform span:nth-child(5){animation-delay:.18s;height:10px}
@keyframes wave { from{transform:scaleY(.3);opacity:.5} to{transform:scaleY(1);opacity:1} }

.bar-icon { flex-shrink:0; display:flex; align-items:center; }
#barLabel { flex:1; color:var(--text-muted); font-size:12px; }
#barLabel strong { color:var(--text); }
#liveTranscript {
  flex:1; font-style:italic; color:var(--text-muted);
  min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  font-size:12px;
}
#liveTranscript.has-text { color:var(--text); font-style:normal; font-weight:500; }

/* ── CHAT ── */
.chat-messages {
  flex:1; overflow-y:auto; padding:16px 14px;
  display:flex; flex-direction:column; gap:16px;
  scroll-behavior:smooth;
}
.chat-messages::-webkit-scrollbar { width:3px; }
.chat-messages::-webkit-scrollbar-thumb { background:var(--border); border-radius:2px; }

.empty-state {
  flex:1; display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  gap:14px; color:var(--text-muted); text-align:center; padding:24px 20px;
}
.empty-icon { opacity:1; }
.empty-state h2 { font-size:17px; font-weight:700; color:var(--text); letter-spacing:-.3px; }
.empty-state p  { font-size:12px; max-width:280px; line-height:1.65; color:var(--text-muted); }

.quick-chips {
  display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin-top:4px;
}
.chip {
  font-size:11px; padding:6px 13px; border-radius:20px;
  border:1px solid var(--border); background:var(--surface);
  color:var(--text-muted); cursor:pointer; transition:all .18s;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  font-weight: 500;
}
.chip:hover { border-color:var(--accent); color:var(--accent); background:var(--accent-dim); box-shadow:0 2px 8px var(--accent-glow); transform:translateY(-1px); }

.msg { display:flex; gap:10px; max-width:100%; }
.msg.user      { align-self:flex-end;   flex-direction:row-reverse; }
.msg.assistant { align-self:flex-start; }

.avatar {
  width:28px; height:28px; border-radius:7px;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.msg.user .avatar      { background:var(--accent); color:white; }
.msg.assistant .avatar { background:var(--surface2); border:1px solid var(--border); color:var(--text-muted); }

.bubble {
  padding:10px 14px; border-radius:var(--radius);
  font-size:13px; line-height:1.7; max-width:calc(100% - 38px);
}
.msg.user .bubble      { background: linear-gradient(135deg, var(--accent) 0%, #7c74f0 100%); color:white; border-bottom-right-radius:3px; box-shadow:0 4px 14px var(--accent-glow); }
.msg.assistant .bubble { background:var(--surface); border:1px solid var(--border); border-bottom-left-radius:3px; box-shadow: var(--shadow); }

.bubble strong { color:var(--accent); font-weight:600; }
.msg.user .bubble strong { color:rgba(255,255,255,.95); }
.bubble ul { padding-left:16px; margin:6px 0; display:flex; flex-direction:column; gap:3px; }
.bubble li { list-style:disc; }
.bubble p  { margin-bottom:6px; }
.bubble p:last-child { margin-bottom:0; }
.bubble h3 { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--accent); margin:10px 0 4px; }
.bubble h3:first-child { margin-top:0; }
.bubble blockquote { border-left:3px solid var(--accent); padding-left:10px; margin:6px 0; color:var(--text-muted); font-style:italic; }

/* ── Answer mode toggle bar (inside bubble) ── */
.answer-mode-bar {
  display:flex; align-items:center; justify-content:space-between;
  margin-top:10px; padding-top:8px;
  border-top:1px solid rgba(255,255,255,.08);
}
.mode-tabs { display:flex; gap:3px; }
.mode-tab {
  font-size:10px; font-weight:600; padding:2px 10px;
  border-radius:20px; border:1px solid var(--border);
  background:transparent; color:var(--text-muted);
  cursor:pointer; transition:all .15s;
}
.mode-tab.active {
  background:var(--accent); color:#fff; border-color:var(--accent);
}
.mode-tab:disabled { opacity:.45; cursor:default; }
.copy-bubble-btn {
  display:flex; align-items:center; gap:4px;
  font-size:10px; font-weight:600; padding:2px 9px;
  border-radius:20px; border:1px solid var(--border);
  background:transparent; color:var(--text-muted);
  cursor:pointer; transition:all .15s;
}
.copy-bubble-btn:hover { border-color:var(--accent); color:var(--accent); }
.short-text { white-space:pre-wrap; line-height:1.7; }

/* ── Skills tags ── */
.skills-section {
  margin-top:8px; padding:8px 10px;
  background:var(--surface2); border-radius:7px;
  border:1px solid var(--border);
}
.skills-section-label {
  font-size:9px; font-weight:700; text-transform:uppercase;
  letter-spacing:.6px; color:var(--text-dim);
  display:flex; align-items:center; gap:4px; margin-bottom:6px;
}
.add-skill-btn {
  margin-left:auto; font-size:9px; font-weight:700; padding:1px 7px; border-radius:20px;
  background:var(--accent-dim); border:1px solid var(--accent); color:var(--accent);
  cursor:pointer; transition:background .15s, color .15s;
}
.add-skill-btn:hover { background:var(--accent); color:#fff; }
.skills-tags { display:flex; flex-wrap:wrap; gap:4px; }
.skill-tag--added { background:var(--accent-dim); border-color:var(--accent); color:var(--accent); }
.add-skill-row {
  display:flex; gap:4px; margin-top:6px; align-items:center;
}
.add-skill-input {
  flex:1; font-size:11px; padding:3px 8px; border-radius:6px;
  border:1px solid var(--border); background:var(--surface); color:var(--text);
  outline:none;
}
.add-skill-input:focus { border-color:var(--accent); }
.add-skill-confirm {
  font-size:10px; font-weight:700; padding:3px 10px; border-radius:6px;
  background:var(--accent); border:none; color:#fff; cursor:pointer;
}
.add-skill-confirm:hover { background:var(--accent-hover); }
.add-skill-cancel {
  font-size:10px; padding:3px 7px; border-radius:6px;
  background:none; border:1px solid var(--border); color:var(--text-muted); cursor:pointer;
}
.add-skill-cancel:hover { border-color:var(--red); color:var(--red); }
.skill-tag {
  font-size:10px; font-weight:600; padding:2px 8px; border-radius:20px;
  background:var(--surface); border:1px solid var(--border); color:var(--text-muted);
}
.skills-gap {
  margin-top:8px; padding-top:6px; border-top:1px solid var(--border);
  font-size:10px; color:var(--red,#e55); display:flex; align-items:flex-start; gap:4px;
  flex-wrap:wrap;
}
.gap-skill-btn {
  font-size:10px; font-weight:600; padding:2px 8px; border-radius:20px;
  background:var(--red-dim); border:1px solid var(--red); color:var(--red);
  cursor:pointer; transition:transform .15s, background .15s, opacity .15s;
  line-height:1.6;
}
.gap-skill-btn:hover:not(:disabled) {
  background:var(--red); color:#fff; transform:translateY(-1px);
}
.gap-skill-btn:disabled { cursor:default; }

.typing-indicator { display:flex; gap:4px; padding:3px 0; align-items:center; }
.typing-indicator span {
  width:6px; height:6px; background:var(--text-muted);
  border-radius:50%; animation:bounce 1.2s infinite;
}
.typing-indicator span:nth-child(2){animation-delay:.2s}
.typing-indicator span:nth-child(3){animation-delay:.4s}
@keyframes bounce { 0%,80%,100%{transform:translateY(0);opacity:.4} 40%{transform:translateY(-5px);opacity:1} }

/* ── INPUT AREA ── */
.input-area {
  border-top:1px solid var(--border);
  padding:10px 12px;
  background:var(--surface);
  flex-shrink:0;
}
.input-wrapper {
  display:flex; gap:6px; align-items:flex-end;
  background:var(--surface2); border:1px solid var(--border);
  border-radius:var(--radius); padding:8px 10px; transition:border-color .15s;
}
.input-wrapper:focus-within { border-color:var(--accent); }
.input-wrapper.is-listening { border-color:var(--red) !important; }
.input-wrapper.is-zoom-listening { border-color:var(--blue) !important; }

textarea {
  flex:1; background:transparent; border:none; outline:none;
  color:var(--text); font-size:13px; font-family:inherit;
  line-height:1.5; resize:none; max-height:120px; min-height:20px;
}
textarea::placeholder { color:var(--text-dim); }

.tool-btn {
  width:30px; height:30px;
  background:var(--surface); border:1px solid var(--border);
  border-radius:7px; color:var(--text-muted); cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0; transition:all .15s;
}
.tool-btn:hover { border-color:var(--accent); color:var(--accent); }

.mic-btn:hover { border-color:var(--red); color:var(--red); }
.mic-btn.active {
  background:var(--red); border-color:var(--red); color:white;
  animation:mic-pulse 1s infinite;
}
.mic-btn.connecting {
  background:var(--surface2); border-color:var(--blue); color:var(--blue);
  animation:pulse-blue 1s infinite;
}

.zoom-btn:hover { border-color:var(--blue); color:var(--blue); }
.zoom-btn.active {
  background:var(--blue); border-color:var(--blue); color:white;
  animation:zoom-pulse 1s infinite;
}
.zoom-btn.connecting { background:var(--surface2); border-color:var(--blue); color:var(--blue); animation:pulse-blue 1s infinite; }

@keyframes mic-pulse  { 0%,100%{box-shadow:0 0 0 0 rgba(220,38,38,.5)}  50%{box-shadow:0 0 0 6px rgba(220,38,38,0)} }
@keyframes zoom-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(37,99,235,.5)}  50%{box-shadow:0 0 0 6px rgba(37,99,235,0)} }
@keyframes pulse-blue { 0%,100%{box-shadow:0 0 0 0 rgba(96,165,250,.4)} 50%{box-shadow:0 0 0 6px rgba(96,165,250,0)} }
@keyframes spin       { to{ transform:rotate(360deg) } }

.send-btn {
  width:32px; height:32px; background: linear-gradient(135deg, var(--accent) 0%, #7c74f0 100%);
  border:none; border-radius:8px; color:white; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0; transition:all .15s;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.send-btn:hover   { background: linear-gradient(135deg, var(--accent-hover) 0%, #6b63e0 100%); box-shadow:0 4px 14px var(--accent-glow); transform:translateY(-1px); }
.send-btn:disabled { background:var(--border); cursor:not-allowed; box-shadow:none; transform:none; }

/* ── IMAGE PREVIEW ── */
#imagePreviewBar {
  display:none; align-items:center; gap:8px;
  padding:6px 12px; background:var(--surface2);
  border-top:1px solid var(--border);
  flex-shrink:0;
}
#imagePreviewBar.visible { display:flex; }
#imageThumb { width:40px; height:40px; border-radius:5px; object-fit:cover; border:1px solid var(--border); flex-shrink:0; }
.preview-info { flex:1; min-width:0; }
.preview-name { font-size:11px; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.preview-hint { font-size:10px; color:var(--text-muted); margin-top:1px; }
.remove-img { background:transparent; border:none; color:var(--text-dim); cursor:pointer; border-radius:4px; transition:color .15s; }
.remove-img:hover { color:var(--red); }

/* ── PANELS (Profile / Settings) ── */
#profileOverlay, #settingsOverlay {
  display:none; position:fixed; inset:0;
  background:rgba(0,0,0,.45); z-index:100; backdrop-filter:blur(2px);
}
#profileOverlay.open, #settingsOverlay.open { display:block; }

#profilePanel, #settingsPanel {
  position:fixed; top:0; right:0; height:100vh;
  width:100%; background:var(--surface);
  border-left:1px solid var(--border);
  display:flex; flex-direction:column; z-index:101;
  transform:translateX(100%); transition:transform .25s ease;
  overflow:hidden;
}
#profilePanel.open, #settingsPanel.open { transform:translateX(0); }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 50;
}
.panel-header-nav { gap: 8px; }

.panel-body { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:16px; }
.panel-body::-webkit-scrollbar { width:3px; }
.panel-body::-webkit-scrollbar-thumb { background:var(--border); border-radius:2px; }

.panel-section { display:flex; flex-direction:column; gap:8px; }
.panel-section-title { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.7px; color:var(--text-dim); }

.panel-textarea {
  background:var(--surface2); border:1px solid var(--border);
  border-radius:7px; color:var(--text); font-size:12px;
  font-family:inherit; line-height:1.6; padding:10px 12px;
  resize:vertical; outline:none; transition:border-color .15s;
}
.panel-textarea:focus { border-color:var(--accent); }
.panel-textarea::placeholder { color:var(--text-dim); }

.panel-input {
  width:100%; padding:10px 12px;
  background:var(--surface2); border:1px solid var(--border);
  border-radius:7px; color:var(--text); font-size:13px;
  font-family:monospace; outline:none; letter-spacing:.5px;
  transition:border-color .15s;
}
.panel-input:focus { border-color:var(--accent); }

.panel-info {
  font-size:11px; color:var(--text-muted); background:var(--surface2);
  border:1px solid var(--border); border-radius:7px; padding:10px 12px; line-height:1.6;
}
.panel-info strong { color:var(--text); }

.resume-actions { display:flex; gap:7px; align-items:center; }
.upload-pdf-btn {
  display:flex; align-items:center; gap:5px;
  background:var(--surface2); border:1px solid var(--border);
  color:var(--text-muted); font-size:11px; padding:6px 12px;
  border-radius:6px; cursor:pointer; transition:all .15s; flex-shrink:0;
}
.upload-pdf-btn:hover { border-color:var(--accent); color:var(--accent); }
.pdf-status { font-size:10px; color:var(--text-muted); flex:1; }
.pdf-status.ok { color:var(--green); }

.panel-footer {
  padding:12px 16px; border-top:1px solid var(--border); flex-shrink:0;
  display:flex; gap:7px;
}
.save-profile-btn {
  flex:1; background: linear-gradient(135deg, var(--accent) 0%, #7c74f0 100%); color:white; border:none;
  border-radius:8px; font-size:12px; font-weight:600;
  padding:10px; cursor:pointer; transition:all .15s;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.save-profile-btn:hover { background: linear-gradient(135deg, var(--accent-hover) 0%, #6b63e0 100%); box-shadow:0 4px 14px var(--accent-glow); }
.save-profile-btn:disabled { background:var(--border); cursor:not-allowed; box-shadow:none; }

.gen-resume-btn {
  flex:1; background:var(--green); color:white; border:none;
  border-radius:7px; font-size:12px; font-weight:600;
  padding:9px; cursor:pointer; transition:background .15s;
  display:flex; align-items:center; justify-content:center; gap:5px;
}
.gen-resume-btn:hover { background:#15803d; }
.gen-resume-btn:disabled { background:var(--border); cursor:not-allowed; }

.clear-profile-btn {
  background:transparent; border:1px solid var(--border);
  color:var(--text-muted); font-size:12px; padding:9px 14px;
  border-radius:7px; cursor:pointer; transition:all .15s;
}
.clear-profile-btn:hover { border-color:var(--red); color:var(--red); }

/* ── RESUME OUTPUT ── */
#resumeOutputSection {
  display:none; flex-direction:column;
  border-top:1px solid var(--border);
}
#resumeOutputSection.visible { display:flex; }

#coverLetterOutputSection {
  display:none; flex-direction:column;
  border-top:1px solid var(--border);
}
#coverLetterOutputSection.visible { display:flex; }

.resume-output-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 16px 6px;
}
.resume-output-title {
  font-size:11px; font-weight:700; text-transform:uppercase;
  letter-spacing:.6px; color:var(--green);
  display:flex; align-items:center; gap:5px;
}
.copy-resume-btn {
  background:transparent; border:1px solid var(--border);
  color:var(--text-muted); font-size:10px; padding:3px 9px;
  border-radius:5px; cursor:pointer; transition:all .15s;
}
.copy-resume-btn:hover { border-color:var(--green); color:var(--green); }
.copy-resume-btn.copied { border-color:var(--green); color:var(--green); background:var(--green-dim); }

#resumeOutput, #coverLetterOutput {
  margin:0 16px 16px; padding:12px 14px;
  background:var(--surface2); border:1px solid var(--border);
  border-radius:7px; font-size:12px; line-height:1.7;
  color:var(--text); overflow-y:auto; max-height:340px;
  font-family:inherit;
}
#resumeOutput h2 { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--accent); margin:12px 0 5px; }
#resumeOutput h2:first-child { margin-top:0; }
#resumeOutput strong { color:var(--text); font-weight:600; }
#resumeOutput ul { padding-left:14px; margin:4px 0 6px; }
#resumeOutput li { margin-bottom:2px; }
#resumeOutput p  { margin-bottom:6px; }

/* Cover letter preview — clean paragraph rendering */
#coverLetterOutput p { margin:0 0 2px; line-height:1.75; }
#coverLetterOutput div { height:10px; }

.resume-edit-area {
  display:none;
  margin:0 16px 16px; padding:12px 14px;
  background:var(--surface2); border:1px solid var(--accent);
  border-radius:7px; font-size:12px; line-height:1.7;
  color:var(--text); width:calc(100% - 32px); box-sizing:border-box;
  min-height:260px; resize:vertical;
  font-family:'Courier New', monospace;
  outline:none;
}
.resume-edit-area:focus { border-color:var(--accent); box-shadow:0 0 0 2px rgba(91,82,232,.15); }
