/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #f4f5fa;
  --panel: #ffffff;
  --panel-soft: #fafbff;
  --text: #14162b;
  --muted: #6b7085;
  --border: #e6e8f1;
  --accent: #6d5efc;
  --accent-2: #9b7bff;
  --accent-soft: #efecff;
  --success: #16a34a;
  --success-soft: #e8f7ee;
  --warn: #d97706;
  --warn-soft: #fdf3e2;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --info: #2563eb;
  --info-soft: #eaf1ff;
  --sidebar: #0e1020;
  --sidebar-2: #171a33;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 22, 43, 0.05), 0 10px 30px rgba(20, 22, 43, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: 258px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: #cfd2e6;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 8px 22px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 8px 18px rgba(109, 94, 252, 0.45);
}

.brand-name {
  font-weight: 700;
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.brand-sub {
  font-size: 11px;
  color: #8c90ad;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  color: #b9bdd6;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.95), rgba(155, 123, 255, 0.95));
  color: #fff;
  box-shadow: 0 8px 20px rgba(109, 94, 252, 0.35);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
  font-size: 11.5px;
  color: #757a98;
  line-height: 1.5;
}

.sidebar-footer strong {
  color: #c9cce1;
}

/* ---------- Main ---------- */
.app-main {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.topbar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
}

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

.content {
  padding: 26px 28px 48px;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

.page-title {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0;
}

.page-subtitle {
  color: var(--muted);
  margin: 6px 0 0;
  font-size: 13.5px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 18px rgba(109, 94, 252, 0.32);
}

.btn-primary:hover {
  box-shadow: 0 10px 24px rgba(109, 94, 252, 0.42);
}

.btn-ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--panel-soft);
}

.btn-soft {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 9px;
}

/* ---------- KPI ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 16px;
  gap: 16px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 94, 252, 0.14), transparent 70%);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.kpi-icon svg {
  width: 18px;
  height: 18px;
}

.kpi-value {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
}

.kpi-label {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.kpi-hint {
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- Panels ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0;
}

.panel-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 0;
}

.panel-body {
  padding: 18px;
}

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

/* ---------- Chart ---------- */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 150px;
  padding-top: 10px;
}

.chart-col {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 30px;
  border-radius: 7px 7px 4px 4px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  min-height: 4px;
  transition: height 0.3s ease;
  position: relative;
}

.chart-bar:hover::after {
  content: attr(data-value);
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.chart-label {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Table ---------- */
.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-soft);
  white-space: nowrap;
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--panel-soft);
}

.cell-title {
  font-weight: 600;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-sub {
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-awaiting,
.badge-approved {
  background: var(--info-soft);
  color: var(--info);
}

.badge-sent {
  background: var(--success-soft);
  color: var(--success);
}

.badge-rejected {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-scored,
.badge-new {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge-source {
  background: #f1f2f8;
  color: var(--muted);
  font-weight: 600;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 3px 9px;
  border-radius: 8px;
  font-weight: 750;
  font-size: 12.5px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Jobs grid ---------- */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-gap: 16px;
  gap: 16px;
}

.job-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 17px;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.job-card:hover {
  transform: translateY(-2px);
  border-color: #d6d3ff;
  box-shadow: 0 14px 34px rgba(20, 22, 43, 0.1);
}

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

.job-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

.job-company {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 11.5px;
  color: var(--muted);
}

.job-meta span {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
}

.job-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- Gauge ---------- */
.gauge {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.gauge svg {
  transform: rotate(-90deg);
}

.gauge-center {
  position: absolute;
  text-align: center;
  line-height: 1.1;
}

.gauge-score {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.gauge-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
}

/* ---------- Score bars ---------- */
.score-bars {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.score-bar-row {
  display: grid;
  grid-template-columns: 96px 1fr 42px;
  align-items: center;
  grid-gap: 10px;
  gap: 10px;
  font-size: 12px;
}

.score-bar-track {
  height: 8px;
  background: #eff0f7;
  border-radius: 999px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ---------- Chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  color: var(--text);
}

.chip-good {
  background: var(--success-soft);
  border-color: #c9ecd6;
  color: #15803d;
}

.chip-gap {
  background: var(--warn-soft);
  border-color: #f3e0bd;
  color: #b45309;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 16, 32, 0.55);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 36px 18px;
  z-index: 60;
  overflow-y: auto;
}

.modal {
  background: var(--panel);
  border-radius: 20px;
  width: 100%;
  max-width: 1000px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: modal-in 0.16s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fbfbff, #fff);
}

.modal-title {
  font-size: 18px;
  font-weight: 750;
  margin: 0;
  letter-spacing: -0.01em;
}

.modal-sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 4px;
}

.modal-close {
  border: 1px solid var(--border);
  background: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--panel-soft);
}

.modal-body {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-gap: 0;
  gap: 0;
}

.modal-col {
  padding: 20px 22px;
}

.modal-col + .modal-col {
  border-left: 1px solid var(--border);
  background: var(--panel-soft);
}

.modal-section-title {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
  margin: 0 0 10px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.modal-narrow {
  max-width: 640px;
}

.modal-body-single {
  padding: 20px 22px;
}

.linkedin-steps {
  margin: 0 0 14px;
  padding-left: 20px;
  font-size: 12.5px;
  line-height: 1.6;
}

.linkedin-steps li {
  margin-bottom: 4px;
}

/* ---------- CV preview (ATS) ---------- */
.cv-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  font-size: 11.5px;
  line-height: 1.55;
  color: #1c1e33;
  max-height: 460px;
  overflow-y: auto;
}

.cv-preview h4 {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  margin: 16px 0 8px;
}

.cv-preview h4:first-of-type {
  margin-top: 12px;
}

.cv-name {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cv-headline {
  text-align: center;
  font-size: 12px;
  color: #3b3e57;
  margin-top: 2px;
}

.cv-contact {
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 4px;
}

.cv-link {
  color: var(--info);
  font-size: 10.5px;
  text-align: center;
  word-break: break-all;
}

.cv-job {
  margin-bottom: 8px;
}

.cv-job-role {
  font-weight: 700;
}

.cv-job-period {
  font-style: italic;
  color: var(--muted);
  font-size: 10.5px;
}

.cv-bullets {
  margin: 4px 0 0;
  padding-left: 16px;
}

.cv-bullets li {
  margin-bottom: 2px;
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 14px;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.hint {
  font-size: 11px;
  color: var(--muted);
}

.input,
.textarea,
.select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.15);
}

.textarea {
  min-height: 90px;
  resize: vertical;
}

.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.repeat-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--panel-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  background: #eef0f7;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab {
  border: none;
  background: transparent;
  padding: 8px 15px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(20, 22, 43, 0.12);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
  z-index: 80;
  max-width: 360px;
}

/* ---------- Bell / dropdown ---------- */
.bell {
  position: relative;
}

.bell-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
}

.bell-btn:hover {
  background: var(--panel-soft);
}

.bell-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
}

.dropdown {
  position: absolute;
  right: 0;
  top: 46px;
  width: 340px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(20, 22, 43, 0.18);
  overflow: hidden;
  z-index: 40;
}

.dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
}

.dropdown-list {
  max-height: 320px;
  overflow-y: auto;
}

.dropdown-item {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  display: block;
}

.dropdown-item:hover {
  background: var(--panel-soft);
}

.dropdown-item-title {
  font-size: 12.5px;
  font-weight: 600;
}

.dropdown-item-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- Misc ---------- */
.empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--muted);
}

.empty-icon {
  font-size: 30px;
  margin-bottom: 10px;
}

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

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

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

.inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.portfolio-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.portfolio-row:last-child {
  border-bottom: none;
}

.portfolio-name {
  font-weight: 600;
  font-size: 12.5px;
}

.portfolio-tags {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.alert {
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 12.5px;
  margin-bottom: 14px;
}

.alert-info {
  background: var(--info-soft);
  color: #1d4ed8;
}

.alert-warn {
  background: var(--warn-soft);
  color: #92400e;
}

.alert-error {
  background: var(--danger-soft);
  color: #b91c1c;
}

.spin {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1080px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .modal-body {
    grid-template-columns: 1fr;
  }
  .modal-col + .modal-col {
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 760px) {
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    padding: 10px 14px;
    gap: 10px;
  }
  .brand {
    padding: 0;
  }
  .brand-sub,
  .sidebar-footer {
    display: none;
  }
  .nav {
    flex-direction: row;
    margin: 0 0 0 auto;
    gap: 2px;
  }
  .nav-item {
    padding: 8px 10px;
    font-size: 12px;
  }
  .nav-item span {
    display: none;
  }
  .content {
    padding: 18px 14px 40px;
  }
  .topbar {
    padding: 0 14px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .kpi-value {
    font-size: 24px;
  }
}

/* ---------- Chat ---------- */
.chat-page {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: calc(100dvh - 140px);
  min-height: 420px;
}

.chat-page-setup {
  height: auto;
  min-height: 0;
}

.chat-compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.chat-title {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin: 0;
}

.chat-page .panel {
  margin-bottom: 0;
}

.chat-shell {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1 1;
  min-height: 0;
}

.chat-messages {
  flex: 1 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 20px 18px;
  background: linear-gradient(180deg, #fbfbff, #f7f8fd);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overscroll-behavior: contain;
}

.chat-alert {
  margin: 0 16px 10px;
}

.chat-messages::-webkit-scrollbar {
  width: 10px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #d9dbea;
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #c3c6dd;
  background-clip: content-box;
}

.chat-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  padding: 40px 12px;
}

.bubble {
  max-width: 82%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
}

.bubble-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-bottom-right-radius: 5px;
  box-shadow: 0 8px 18px rgba(109, 94, 252, 0.25);
}

.bubble-assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
  box-shadow: 0 4px 14px rgba(20, 22, 43, 0.05);
}

.bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble-meta {
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--muted);
  border-top: 1px dashed var(--border);
  padding-top: 5px;
}

.bubble-user .bubble-meta {
  color: rgba(255, 255, 255, 0.8);
  border-top-color: rgba(255, 255, 255, 0.3);
}

.composer {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: #fff;
}

.composer-input {
  flex: 1 1;
  resize: none;
  min-height: 46px;
  max-height: 140px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 13px;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
}

.composer-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109, 94, 252, 0.15);
}

.composer-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
  flex-shrink: 0;
}

.attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 9px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.attach-chip.attach-binary {
  background: var(--warn-soft);
  color: #b45309;
}

.attach-chip.attach-image {
  background: var(--info-soft);
  color: var(--info);
}

.attach-chip.attach-linkedin {
  background: #e8f0fe;
  color: #0a66c2;
}

.attach-name {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attach-flag {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.8;
}

.attach-chip button {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 1px;
  opacity: 0.7;
}

.attach-chip button:hover {
  opacity: 1;
}

.recording-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

.rec-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
  animation: rec-pulse 1.1s ease-in-out infinite;
}

@keyframes rec-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(220, 38, 38, 0);
  }
}

.rec-info {
  flex: 1 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12.5px;
  font-weight: 600;
}

.rec-hint,
.rec-interim {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rec-interim {
  color: var(--accent);
}

.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(109, 94, 252, 0.14);
  border: 3px dashed var(--accent);
  display: grid;
  place-items: center;
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  pointer-events: none;
}

.drop-card {
  background: #fff;
  color: var(--accent);
  font-weight: 750;
  padding: 22px 30px;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(20, 22, 43, 0.18);
}

.composer-icon-btn {
  gap: 5px;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.suggestion {
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.suggestion:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.suggestion:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.suggestions-center {
  justify-content: center;
  max-width: 620px;
  margin: 0 auto;
}

/* ---------- Markdown ---------- */
.md {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.md > *:first-child {
  margin-top: 0;
}

.md > *:last-child {
  margin-bottom: 0;
}

.md p {
  margin: 0 0 8px;
}

.md h1,
.md h2,
.md h3,
.md h4 {
  margin: 14px 0 6px;
  line-height: 1.3;
  font-size: 1.02em;
}

.md h1 {
  font-size: 1.18em;
}

.md h2 {
  font-size: 1.1em;
}

.md ul,
.md ol {
  margin: 6px 0 8px;
  padding-left: 20px;
}

.md li {
  margin: 2px 0;
}

.md a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.md strong {
  font-weight: 750;
}

.md blockquote {
  margin: 8px 0;
  padding: 6px 12px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  color: var(--text);
}

.md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #f1f2f9;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
}

.md pre {
  margin: 8px 0;
  padding: 11px 12px;
  background: #14162b;
  color: #e9eaf6;
  border-radius: 10px;
  overflow-x: auto;
}

.md pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: 0.86em;
  white-space: pre;
}

.md table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 0.94em;
  display: block;
  overflow-x: auto;
}

.md th,
.md td {
  border: 1px solid var(--border);
  padding: 6px 9px;
  text-align: left;
  white-space: nowrap;
}

.md th {
  background: var(--panel-soft);
  font-weight: 700;
}

.md hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

@media (max-width: 760px) {
  .bubble {
    max-width: 94%;
  }
  .composer {
    flex-direction: column;
    align-items: stretch;
  }
  .composer-actions {
    justify-content: flex-end;
  }
  .chat-page {
    height: calc(100dvh - 58px - 66px - 58px);
    min-height: 280px;
  }
  .chat-page-setup {
    height: auto;
  }
  .chat-compact-head .eyebrow {
    display: none;
  }
  .chat-title {
    font-size: 19px;
  }
  .suggestions {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    justify-content: flex-start;
  }
  .suggestion {
    white-space: nowrap;
  }
  .chat-messages {
    padding: 14px 12px;
  }
  .attach-name {
    max-width: 150px;
  }
  .composer-icon-btn {
    flex: 1 1;
    justify-content: center;
  }
  .recording-bar {
    flex-wrap: wrap;
  }
  .recording-bar .composer-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ---------- GitHub ---------- */
.github-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.github-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.github-avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 24px;
}

.github-name {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

a.job-card {
  text-decoration: none;
}

.device-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-align: center;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #ddd8ff;
  border-radius: 12px;
  padding: 14px 10px;
  -webkit-user-select: all;
     -moz-user-select: all;
          user-select: all;
}

