*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #070b14;
  --surface: #0f1629;
  --surface-2: #161f35;
  --surface-3: #1c2844;
  --border: #243049;
  --text: #f1f5f9;
  --text-muted: #8b9cb8;
  --accent: #3b82f6;
  --accent-2: #6366f1;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --success: #22c55e;
  --success-glow: rgba(34, 197, 94, 0.4);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.4);
  --tr-color: #fbbf24;
  --purple: #a855f7;
  --font-size-tr: clamp(1.75rem, 4vw, 3rem);
  --radius: 14px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

body.font-sm { --font-size-tr: clamp(1.25rem, 3vw, 2rem); }
body.font-lg { --font-size-tr: clamp(2.25rem, 5vw, 4rem); }

.app {
  max-width: 1400px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1rem;
  overflow: hidden;
}

/* Header */
.header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.header h1 {
  font-size: 1.35rem;
  font-weight: 700;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.header-right {
  display: none;
}

/* Language bar */
.lang-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lang-select-wrap label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.lang-select-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.35rem 0.65rem;
}

.lang-select-flag {
  font-size: 1.1rem;
}

.lang-select {
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  min-width: 160px;
  cursor: pointer;
  outline: none;
}

.btn-swap {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

.btn-swap:hover:not(:disabled) {
  color: var(--accent);
  border-color: rgba(59, 130, 246, 0.4);
}

.btn-swap:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.auto-detect {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  cursor: pointer;
  white-space: nowrap;
}

.auto-detect input {
  accent-color: var(--accent);
}

.lang-warn {
  font-size: 0.7rem;
  color: #fb923c;
  margin-top: 0.35rem;
}

.detected-lang {
  margin-left: auto;
  font-size: 0.75rem;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.lang-badge {
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.lang-badge.en {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.lang-badge.tr {
  background: rgba(251, 191, 36, 0.15);
  color: var(--tr-color);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.arrow-icon {
  color: var(--text-muted);
}

/* Main layout */
.main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: stretch;
}

.content-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
}

/* Translation panel — üst kart */
.translation-panel {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--accent);
}

.panel-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.pulse-dot.listening {
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success-glow);
  animation: pulse 1.5s infinite;
}

.pulse-dot.error {
  background: var(--danger);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--success-glow); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.translation-display {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  min-height: 120px;
}

.interim-source {
  color: var(--text-muted);
  font-size: 1rem;
  font-style: italic;
  min-height: 1.5rem;
  opacity: 0.7;
}

.translation-target {
  font-size: var(--font-size-tr);
  font-weight: 600;
  color: var(--tr-color);
  line-height: 1.35;
}

.translation-target.loading {
  opacity: 0.5;
}

/* History — gizli, isteğe bağlı */
.history-section {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.history-section.hidden {
  display: none;
}

.history-section h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.history-list {
  list-style: none;
  max-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-list li {
  padding: 0.65rem 0.85rem;
  background: var(--surface-2);
  border-radius: 8px;
  font-size: 0.875rem;
  border-left: 3px solid var(--accent);
}

.history-list li .src {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 0.2rem;
}

.history-list li .tgt {
  color: var(--text);
}

/* Sidebar tabs */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

.sidebar-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  flex-shrink: 0;
}

.tab-btn {
  flex: 1;
  padding: 0.55rem 0.5rem;
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn.active {
  color: var(--text);
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}

.tab-panel.active {
  display: flex;
}

/* Profile editor */
.profile-editor {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.editor-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-section-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

.section-block-header {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.section-block-header .section-title {
  flex: 1;
}

.profile-item {
  position: relative;
  padding: 0.65rem;
  padding-right: 2rem;
  background: var(--surface);
  border-radius: 8px;
  margin-bottom: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.qa-block {
  position: relative;
  padding: 0.75rem;
  padding-right: 2rem;
  background: var(--surface-2);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.btn-icon {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 4px;
}

.btn-icon:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

.btn-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-primary {
  width: 100%;
  padding: 0.65rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  color: white;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 0.5rem;
}

.btn-secondary {
  flex: 1;
  padding: 0.5rem 0.65rem;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.btn-danger-outline {
  padding: 0.5rem 0.65rem;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--danger);
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
  cursor: pointer;
}

.coach-source.profile {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.coach-source.system {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .main { grid-template-columns: 1fr; }
}

/* Mobile-only elements */
.mobile-source-bar,
.mobile-bottom-nav,
.mob-panel-head {
  display: none;
}

@media (max-width: 768px) {
  :root {
    --font-size-tr: clamp(1.35rem, 5.5vw, 2rem);
    --mobile-nav-h: 62px;
    --mobile-footer-h: 68px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --app-bottom: calc(var(--mobile-nav-h) + var(--mobile-footer-h) + var(--safe-bottom));
  }

  body {
    min-height: 100dvh;
    overflow: hidden;
  }

  .app {
    max-width: none;
    width: 100%;
    height: 100dvh;
    padding: 0.65rem 0.75rem 0;
    padding-bottom: var(--app-bottom);
    gap: 0.55rem;
  }

  .main,
  .content-column,
  .header,
  .lang-bar {
    width: 100%;
  }

  /* Header — compact */
  .header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding-bottom: 0.15rem;
  }

  .header-left {
    gap: 0.65rem;
  }

  .logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .header h1 {
    font-size: 1.1rem;
    line-height: 1.2;
  }

  .subtitle {
    display: none;
  }

  /* Language bar — 2-col grid */
  .lang-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.35rem 0.4rem;
    align-items: end;
    width: 100%;
  }

  .lang-select-wrap {
    min-width: 0;
  }

  .lang-select-wrap label {
    font-size: 0.62rem;
    margin-bottom: 0.25rem;
  }

  .lang-select-box {
    padding: 0.3rem 0.45rem;
    border-radius: 8px;
  }

  .lang-select {
    min-width: 0;
    width: 100%;
    font-size: 0.76rem;
  }

  .btn-swap {
    width: 32px;
    height: 32px;
    margin-bottom: 0;
    align-self: end;
    border-radius: 8px;
  }

  .auto-detect {
    grid-column: 1 / -1;
    justify-content: center;
    margin: 0;
    font-size: 0.72rem;
    padding: 0.15rem 0;
  }

  /* Main layout */
  .main {
    grid-template-columns: 1fr;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
  }

  .content-column {
    flex: 1;
    min-height: 0;
    gap: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  body.view-profile .content-column,
  body.view-settings .content-column,
  body.view-coach .content-column,
  body.view-meetings .content-column {
    display: none;
  }

  /* Translation + coach stack */
  .translation-panel {
    flex-shrink: 0;
    padding: 0.85rem 1rem 0.75rem;
    border-radius: 12px 12px 0 0;
    border-left-width: 3px;
  }

  .panel-label {
    font-size: 0.78rem;
    margin-bottom: 0.65rem;
    gap: 0.45rem;
  }

  .translation-display {
    min-height: 72px;
    gap: 0.4rem;
  }

  .interim-source {
    font-size: 0.85rem;
  }

  .mobile-source-bar {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border);
  }

  .source-chip {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 500;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
  }

  .source-chip:has(input:checked) {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.4);
    color: #93c5fd;
  }

  .source-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .coach-panel {
    flex: 1;
    min-height: 0;
    padding: 0.85rem 1rem;
    border-radius: 0 0 12px 12px;
    border-left-width: 3px;
    border-top: none;
    margin-top: -1px;
  }

  .coach-title h3 {
    font-size: 0.9rem;
  }

  .coach-desc {
    font-size: 0.72rem;
  }

  .coach-header {
    margin-bottom: 0.65rem;
  }

  .coach-question-wrap {
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.55rem;
  }

  .coach-question {
    font-size: 0.88rem;
  }

  .coach-answer {
    padding: 0.75rem 0.85rem;
  }

  .coach-answer-en {
    font-size: 0.92rem;
  }

  /* Sidebar — desktop tabs hidden, panels as overlays */
  .sidebar-tabs {
    display: none;
  }

  .sidebar {
    position: static;
    overflow: visible;
  }

  .tab-panel {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-nav-h) + var(--safe-bottom));
    z-index: 40;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: calc(0.65rem + env(safe-area-inset-top, 0px)) 0.75rem 1rem;
    background: var(--bg);
    gap: 0.65rem;
  }

  body.view-profile #tab-profile.active,
  body.view-settings #tab-settings.active,
  body.view-coach #tab-coach.active,
  body.view-meetings #tab-meetings.active {
    display: flex !important;
  }

  body.view-meeting .tab-panel {
    display: none !important;
  }

  body.view-profile .tab-panel,
  body.view-settings .tab-panel,
  body.view-coach .tab-panel,
  body.view-meetings .tab-panel {
    display: none !important;
  }

  /* Bottom navigation */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    height: calc(var(--mobile-nav-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(15, 22, 41, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
  }

  .mob-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.35rem 0.25rem;
    font-family: inherit;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-nav-btn svg {
    opacity: 0.65;
    transition: opacity 0.15s;
  }

  .mob-nav-btn.active {
    color: #93c5fd;
  }

  .mob-nav-btn.active svg {
    opacity: 1;
  }

  .mob-nav-btn.active span {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* Footer — sticky above nav */
  .footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--mobile-nav-h) + var(--safe-bottom));
    z-index: 90;
    padding: 0.45rem 0.75rem;
    gap: 0.5rem;
    background: linear-gradient(to top, var(--bg) 70%, rgba(7, 11, 20, 0.85));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  body.view-profile .footer,
  body.view-settings .footer,
  body.view-coach .footer,
  body.view-meetings .footer {
    display: none;
  }

  .btn-listen {
    flex: 1;
    justify-content: center;
    padding: 0.8rem 1.25rem;
    font-size: 0.95rem;
    border-radius: 12px;
    animation: none;
    box-shadow: 0 4px 20px var(--accent-glow);
  }

  .btn-listen:not(.listening) {
    animation: none;
  }

  .btn-listen .mic-icon {
    width: 22px;
    height: 22px;
  }

  .btn-clear {
    flex-shrink: 0;
    padding: 0.65rem 0.9rem;
    font-size: 0.8rem;
    border-radius: 12px;
  }

  /* Profile overlay scroll padding */
  .mob-panel-head {
    display: block;
    padding: 0.25rem 0 0.75rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.25rem;
  }

  .mob-panel-head h2 {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text), #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .mob-panel-head p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
  }

  .profile-editor {
    padding-bottom: 1rem;
  }

  .control-card {
    padding: 1rem;
    border-radius: 12px;
  }

  .control-card h3 {
    font-size: 0.78rem;
  }

  /* Toast on mobile */
  .toast-box {
    top: auto;
    bottom: calc(var(--app-bottom) + 0.5rem);
    left: 0.75rem;
    right: 0.75rem;
  }

  .toast {
    max-width: none;
  }
}

@media (max-width: 380px) {
  .lang-select {
    font-size: 0.7rem;
  }

  .btn-listen span {
    font-size: 0.88rem;
  }

  .source-chip span {
    font-size: 0.68rem;
  }
}

/* Toast notifications */
.toast-box {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.75rem 1.1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease;
  pointer-events: auto;
  max-width: 320px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.12); }
.toast-error { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.12); }
.toast-info { border-color: rgba(59,130,246,0.4); background: rgba(59,130,246,0.12); }

/* CV Analyzer */
.cv-analyzer { border-left: 3px solid var(--success); }
.cv-paste { min-height: 100px; resize: vertical; font-size: 0.82rem; line-height: 1.5; }
.analysis-status { margin-top: 0.75rem; }
.completeness-bar, .mini-bar {
  height: 6px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.5rem 0;
}
.completeness-fill, .mini-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.completeness-text { font-size: 0.78rem; color: var(--text-muted); display: block; }
.completeness-detail { font-size: 0.72rem; color: var(--success); display: block; margin-top: 0.2rem; }
.empty-hint { font-size: 0.8rem; color: var(--text-muted); padding: 0.5rem 0; }

/* Improved tabs */
.tab-btn {
  flex: 1;
  padding: 0.6rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn.active {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 2px 12px var(--accent-glow);
}

/* Listen button pulse when ready */
.btn-listen:not(.listening) {
  animation: readyPulse 3s ease-in-out infinite;
}
@keyframes readyPulse {
  0%, 100% { box-shadow: 0 4px 24px var(--accent-glow); }
  50% { box-shadow: 0 4px 32px rgba(99, 102, 241, 0.5); }
}
.btn-listen.listening { animation: none; }

.control-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.control-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.source-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.radio-option:hover {
  background: var(--surface-2);
}

.radio-option:has(input:checked) {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
}

.radio-option input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.radio-label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.radio-label strong {
  font-size: 0.875rem;
}

.radio-label small {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.toggle-row,
.slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.toggle-row input,
.slider-row input {
  accent-color: var(--accent);
}

.control-card.tips ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control-card.tips li {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}

.control-card.tips li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Footer */
.footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-top: 0.25rem;
}

.btn-listen {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: inherit;
  color: white;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-listen:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-listen:active {
  transform: translateY(0);
}

.btn-listen.listening {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  box-shadow: 0 4px 24px var(--danger-glow);
}

.btn-listen.listening:hover {
  box-shadow: 0 8px 32px var(--danger-glow);
}

.btn-listen .mic-icon {
  flex-shrink: 0;
}

.btn-clear {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.btn-clear:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* Scrollbar */
.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* Coach panel — alt kart, kalan alanı doldurur */
.coach-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  border-left: 4px solid #a855f7;
  overflow: hidden;
}

.coach-panel.hidden {
  display: none;
}

.coach-header {
  flex-shrink: 0;
  margin-bottom: 1rem;
}

.coach-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #c084fc;
}

.coach-title h3 {
  font-size: 1rem;
  font-weight: 700;
}

.coach-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.coach-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.coach-source {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  margin-left: auto;
}

.coach-source.ai {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.coach-source.cv {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.coach-source.aiesec {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
}

.coach-question-wrap {
  flex-shrink: 0;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
}

.coach-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.coach-question {
  font-size: 1rem;
  color: #e9d5ff;
  font-weight: 500;
  margin-top: 0.3rem;
  font-style: italic;
}

.coach-answers {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
}

.coach-answer {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-left: 3px solid #a855f7;
  flex-shrink: 0;
  transition: border-color 0.15s;
}

.coach-answer:hover {
  border-color: rgba(168, 85, 247, 0.4);
}

.coach-answer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.coach-answer-num {
  width: 24px;
  height: 24px;
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.btn-copy {
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.btn-copy:hover {
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.4);
}

.coach-answer-en {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.coach-answer-tr {
  font-size: 0.875rem;
  color: var(--tr-color);
  line-height: 1.4;
}

.coach-answer-tip {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.coach-loading,
.coach-error,
.coach-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.coach-error {
  color: var(--danger);
}

/* Profile card */
.profile-card .profile-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.profile-info strong {
  font-size: 1rem;
}

.profile-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.profile-stat {
  color: #4ade80 !important;
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Form fields */
.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  line-height: 1.4;
}

.input-field {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
}

.input-field:focus {
  border-color: var(--accent);
}

.btn-save-key {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.55rem;
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-save-key:hover {
  background: var(--border);
}

.coach-answers::-webkit-scrollbar {
  width: 6px;
}

.coach-answers::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* Interview prep panel — sidebar */
.prep-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  border-left: 3px solid #f97316;
}

.prep-panel.collapsed .prep-project,
.prep-panel.collapsed .prep-categories,
.prep-panel.collapsed .prep-list {
  display: none;
}

.prep-panel.collapsed .prep-subtitle {
  display: none;
}

.prep-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.prep-panel.collapsed .prep-header {
  margin-bottom: 0;
}

.prep-header h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fb923c;
}

.prep-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.prep-toggle {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.prep-toggle:hover {
  color: var(--text);
}

.prep-project {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

.prep-project strong {
  width: 100%;
  font-size: 0.9rem;
}

.prep-project span {
  color: var(--text-muted);
}

.prep-tag {
  color: #fb923c !important;
  font-weight: 500;
}

.prep-dates {
  color: #60a5fa !important;
}

.prep-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.prep-cat-btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}

.prep-cat-btn span {
  opacity: 0.6;
  margin-left: 0.15rem;
}

.prep-cat-btn:hover,
.prep-cat-btn.active {
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.4);
  background: rgba(249, 115, 22, 0.08);
}

.prep-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 220px;
  overflow-y: auto;
}

.prep-question-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.55rem 0.7rem;
  text-align: left;
  font-family: inherit;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}

.prep-question-btn:hover {
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.06);
}

.prep-question-btn.clicked {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.12);
}

.prep-q-cat {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fb923c;
  font-weight: 600;
}

.prep-q-text {
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.3;
}

.prep-error {
  color: var(--danger);
  font-size: 0.875rem;
  padding: 1rem;
}

.prep-list::-webkit-scrollbar {
  width: 6px;
}

.prep-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* Utility */
.hidden {
  display: none !important;
}

/* PWA install banner */
.pwa-install-banner {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  background: rgba(15, 22, 41, 0.97);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pwa-install-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.pwa-install-text strong {
  font-size: 0.85rem;
}

.pwa-install-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pwa-install-btn {
  flex-shrink: 0;
  padding: 0.5rem 0.85rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.pwa-install-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 6px;
}

@media (max-width: 768px) {
  body.view-meeting .pwa-install-banner {
    bottom: calc(var(--mobile-nav-h) + var(--mobile-footer-h) + 0.5rem + env(safe-area-inset-bottom, 0px));
  }
}
