/* ==========================================================================
   MindMatch · Sistema de diseño «Tablero suave»
   Hoja de estilos única. Todas las pantallas la enlazan.
   HTML5 + CSS a mano · sin framework.
   Lavanda muy clara de fondo, paneles blancos con radios grandes, Nunito,
   navegación en píldoras y columnas tintadas (melocotón, menta, lavanda).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

/* The hidden attribute always hides, even on .mm-col / .mm-row (display:flex). */
[hidden] { display: none !important; }

/* ------------------------------- TOKENS ---------------------------------- */
:root {
  /* Marca */
  --color-primary:      #7A3B62;
  --color-primary-dark: #5E2B4B;
  --color-primary-soft: #F5E7EF;
  --color-primary-text: #6E3357; /* texto sobre soft */
  --color-accent:       #E8895A;
  --color-accent-dark:  #B5582F;
  --color-accent-soft:  #FFEFE6;

  /* Superficies */
  --bg-app:  #F5F2FA;
  --bg-card: #FFFFFF;
  --bg-sunken: #ECE8F6;
  --border:  #E8E3F0;
  --border-strong: #D6CFE3;

  /* Tintas de columna / sección */
  --tint-peach: #FFEFE6; --tint-peach-text: #8A4120;
  --tint-mint:  #E6F4EC; --tint-mint-text:  #1E7A50;
  --tint-lilac: #ECE8F6; --tint-lilac-text: #4F3F7A;
  --tint-sun:   #FBEFD5; --tint-sun-text:   #7A5410;

  /* Texto */
  --text-primary:   #2B2338;
  --text-secondary: #5E5570;
  --text-muted:     #6F6680;
  --text-faint:     #B3ABC2;

  /* Estados */
  --success: #2E9E6B; --success-dark: #1E7A50; --success-soft: #E6F4EC;
  --warning: #E3A63A; --warning-dark: #7A5410; --warning-soft: #FBEFD5;
  --error:   #D14A38; --error-dark:   #A5321F; --error-soft:   #FBE3DD;
  --info:    #3E7DB8; --info-dark:    #2C5E8F; --info-soft:    #E2ECF6;

  /* Tipografía */
  --font-display: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Nunito', 'Segoe UI', system-ui, sans-serif;

  /* Escala tipográfica */
  --fs-display: 40px;
  --fs-h1: 30px;
  --fs-h2: 22px;
  --fs-h3: 18px;
  --fs-body: 15px;
  --fs-small: 14px;
  --fs-caption: 12px;

  /* Espaciado */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;

  /* Radios */
  --radius-sm: 12px; --radius-md: 16px; --radius-lg: 20px; --radius-xl: 28px; --radius-full: 999px;

  /* Sombras */
  --shadow-card:     0 2px 8px rgba(43,35,56,.06);
  --shadow-elevated: 0 8px 24px rgba(43,35,56,.10);
  --shadow-overlay:  0 20px 48px rgba(43,35,56,.18);
  --shadow-primary:  0 6px 16px rgba(122,59,98,.25);

  /* Layout */
  --sidebar-w: 232px;
  --shell-gap: 20px;
  --header-h: 68px;
}

/* -------------------------------- BASE ----------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-app);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid rgba(122,59,98,.4); outline-offset: 2px; }

h1,h2,h3,h4 { margin: 0; }
.mm-display { font-family: var(--font-display); font-size: var(--fs-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.mm-h1 { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.mm-h2 { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 800; letter-spacing: -0.015em; }
.mm-h3 { font-size: var(--fs-h3); font-weight: 800; }
.mm-small { font-size: var(--fs-small); }
.mm-muted { color: var(--text-muted); }
.mm-secondary { color: var(--text-secondary); }
.mm-caption { font-size: var(--fs-caption); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }

.mm-eyebrow { font-size: var(--fs-caption); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--color-primary); }

/* utilities */
.mm-row { display: flex; align-items: center; gap: var(--space-3); }
.mm-col { display: flex; flex-direction: column; }
.mm-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.mm-grow { flex: 1; }
.mm-divider { height: 1px; background: var(--border); border: 0; margin: 0; }
.mm-hidden { display: none !important; }
.mm-icon { display: inline-flex; }
.mm-icon svg { display: block; }

/* ------------------------------ BUTTONS ---------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 44px; padding: 0 20px; border: none; border-radius: var(--radius-full);
  font: 800 15px/1 var(--font-body); cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .05s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; }

.btn--primary { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-primary); }
.btn--primary:hover { background: var(--color-primary-dark); }
.btn--primary:disabled { background: #E6CFDB; box-shadow: none; }

.btn--secondary { background: var(--bg-card); color: var(--text-primary); border: 1.5px solid var(--border-strong); }
.btn--secondary:hover { background: var(--bg-sunken); border-color: #C6BDD6; }
.btn--secondary:disabled { color: var(--text-faint); border-color: var(--border); }

.btn--ghost { background: transparent; color: var(--color-primary); }
.btn--ghost:hover { background: var(--color-primary-soft); color: var(--color-primary-dark); }
.btn--ghost:disabled { color: var(--text-faint); background: transparent; }

.btn--destructive { background: var(--error); color: #fff; }
.btn--destructive:hover { background: var(--error-dark); }
.btn--destructive:disabled { background: #EDC4BC; }

.btn--success { background: var(--success); color: #fff; }
.btn--success:hover { filter: brightness(.94); }

.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn--lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--icon { width: 44px; padding: 0; }
.btn--icon.btn--sm { width: 36px; }

/* loading spinner inside button */
.btn__spinner {
  width: 15px; height: 15px; border-radius: var(--radius-full);
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
  animation: mm-spin .7s linear infinite;
}
.btn--secondary .btn__spinner { border-color: rgba(94,85,112,.25); border-top-color: var(--text-secondary); }
@keyframes mm-spin { to { transform: rotate(360deg); } }

/* -------------------------------- FORMS ---------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-size: 13px; font-weight: 800; color: var(--text-primary); }
.helper { font-size: 13px; color: var(--text-muted); }
.error-text { font-size: 13px; font-weight: 700; color: var(--error-dark); display: flex; align-items: center; gap: 6px; }

.input, .textarea, .select {
  width: 100%; height: 46px; padding: 0 16px;
  border: 1.5px solid var(--border-strong); border-radius: 14px;
  background: var(--bg-card); font: 500 15px var(--font-body); color: var(--text-primary);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { height: auto; padding: 12px 16px; line-height: 1.5; resize: vertical; min-height: 92px; }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(122,59,98,.14);
}
.input:disabled, .textarea:disabled, .select:disabled {
  background: var(--bg-app); color: var(--text-faint); border-color: var(--border); cursor: not-allowed;
}
.input--error { border-color: var(--error); box-shadow: 0 0 0 4px rgba(209,74,56,.14); }
.input::placeholder, .textarea::placeholder { color: var(--text-faint); font-weight: 500; }

.select-wrap { position: relative; }
.select { appearance: none; padding-right: 40px; cursor: pointer; }
.select-wrap::after {
  content: ""; position: absolute; right: 17px; top: 50%; width: 9px; height: 9px;
  border-right: 2.5px solid var(--text-muted); border-bottom: 2.5px solid var(--text-muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}

/* Native, accessible pickers styled to match the rest of the application.
   Browsers without customizable selects retain their standard picker. */
@supports (appearance: base-select) and selector(select::picker(select)) {
  select:is(.select, .input):not([multiple]):not([size]),
  select:is(.select, .input):not([multiple]):not([size])::picker(select) {
    appearance: base-select;
  }
  select:is(.select, .input):not([multiple]):not([size]) {
    align-items: center;
    gap: 12px;
    padding-inline-end: 16px;
    cursor: pointer;
  }
  .select-wrap:has(> select:not([multiple]):not([size]))::after { display: none; }
  select:is(.select, .input):not([multiple]):not([size])::picker-icon {
    content: "";
    width: 8px; height: 8px; flex-shrink: 0;
    margin-inline-start: auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    color: var(--text-muted);
    transform: translateY(-2px) rotate(45deg);
  }
  select:is(.select, .input):open::picker-icon {
    transform: translateY(2px) rotate(225deg);
  }
  select:is(.select, .input)::picker(select) {
    margin-block: 6px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-elevated);
    font: 600 14px/1.5 var(--font-body);
    max-block-size: min(320px, 60dvh);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  select:is(.select, .input):not([multiple]):not([size]) option {
    min-block-size: 40px;
    padding: 9px 12px;
    gap: 12px;
    border-radius: 8px;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
  }
  select:is(.select, .input) option:checked {
    background: var(--color-primary-soft);
    color: var(--color-primary-text);
    font-weight: 800;
  }
  select:is(.select, .input) option:not(:disabled):is(:hover, :focus-visible) {
    background: var(--bg-sunken);
    color: var(--text-primary);
    outline: none;
  }
  select:is(.select, .input) option::checkmark {
    order: 1;
    margin-inline-start: auto;
    color: var(--color-primary);
  }
  select:is(.select, .input) option:disabled {
    color: var(--text-faint);
    cursor: not-allowed;
  }
  select:is(.select, .input) optgroup {
    padding: 4px;
    color: var(--text-secondary);
    font-weight: 800;
  }
}

/* checkbox / radio / toggle (native + label) */
.check { display: inline-flex; align-items: center; gap: 12px; font-size: 15px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--color-primary); cursor: pointer; }
.toggle { position: relative; width: 46px; height: 27px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle__track { position: absolute; inset: 0; border-radius: var(--radius-full); background: var(--border-strong); transition: background .15s ease; pointer-events: none; }
.toggle__thumb { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: var(--radius-full); background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: left .15s ease; pointer-events: none; }
.toggle input:checked ~ .toggle__track { background: var(--color-primary); }
.toggle input:checked ~ .toggle__thumb { left: 22px; }

.matching-priorities {
  margin-top: 4px; padding: 18px; border: 0;
  border-radius: var(--radius-lg); background: var(--bg-app);
}
.matching-priorities fieldset {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px;
  min-width: 0; margin: 18px 0 0; padding: 0; border: 0;
}
.matching-priority label { font-size: 13px; font-weight: 800; color: var(--text-primary); }
.matching-priority output {
  min-width: 34px; padding: 3px 8px; border-radius: var(--radius-full);
  background: var(--color-primary-soft); color: var(--color-primary-text);
  font-size: 12px; font-weight: 800; text-align: center;
}
.matching-priority input[type="range"] {
  --range-value: 0%;
  width: 100%; height: 6px; margin: 12px 0 3px; border-radius: var(--radius-full);
  appearance: none; cursor: pointer;
  background: linear-gradient(
    to right,
    var(--color-primary) 0 var(--range-value),
    var(--border-strong) var(--range-value) 100%
  );
}
.matching-priority input[type="range"]::-webkit-slider-thumb {
  width: 20px; height: 20px; border: 3px solid var(--color-primary);
  border-radius: 50%; appearance: none; background: #fff; box-shadow: var(--shadow-card);
}
.matching-priority input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border: 3px solid var(--color-primary);
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-card);
}

/* -------------------------------- CARD ----------------------------------- */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.card--flat { box-shadow: none; }
.card--tint-peach { background: var(--tint-peach); border-color: transparent; box-shadow: none; }
.card--tint-mint { background: var(--tint-mint); border-color: transparent; box-shadow: none; }
.card--tint-lilac { background: var(--tint-lilac); border-color: transparent; box-shadow: none; }
.card__header { padding: 16px 20px; background: var(--bg-app); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.card__body { padding: 20px; }

/* -------------------------------- BADGE ---------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 800; line-height: 1; white-space: nowrap;
}
.badge svg { width: 14px; height: 14px; }
.badge--neutral { background: var(--bg-sunken); color: var(--text-secondary); }
.badge--success { background: var(--success-soft); color: var(--success-dark); }
.badge--warning { background: var(--warning-soft); color: var(--warning-dark); }
.badge--error   { background: var(--error-soft);   color: var(--error-dark); }
.badge--info    { background: var(--info-soft);    color: var(--info-dark); }
.badge--accent  { background: var(--color-accent); color: var(--text-primary); }
.badge--primary { background: var(--color-primary-soft); color: var(--color-primary-text); }

/* --- Estados de candidatura (mini-sistema). data-status en el elemento --- */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-full); font-size: 12px; font-weight: 800; line-height: 1; white-space: nowrap; }
.status svg { width: 14px; height: 14px; }
.status[data-status="INTERVIEW_PREPARING"],
.status[data-status="INTERVIEW_PENDING"] { background: var(--info-soft);          color: var(--info-dark); }
.status[data-status="TESTS_PENDING"],
.status[data-status="TESTS_IN_PROGRESS"] { background: var(--color-accent-soft);  color: var(--color-accent-dark); }
.status[data-status="APPROVAL_PENDING"],
.status[data-status="REVIEW_PENDING"]    { background: var(--warning-soft);       color: var(--warning-dark); }
.status[data-status="RESULTS_PENDING"]   { background: var(--color-primary-soft); color: var(--color-primary-text); }
.status[data-status="COMPLETED"]         { background: var(--success-soft);       color: var(--success-dark); }
.status[data-status="REJECTED"]          { background: var(--error-soft);         color: var(--error-dark); }
.status[data-status="ABANDONED"]         { background: var(--bg-sunken);          color: var(--text-secondary); }

/* ------------------------------- AVATAR ---------------------------------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: var(--color-primary-soft); color: var(--color-primary-text);
  font-weight: 800; font-size: 15px; flex-shrink: 0; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 28px; height: 28px; font-size: 12px; }
.avatar--lg { width: 56px; height: 56px; font-size: 20px; }
.avatar--xl { width: 72px; height: 72px; font-size: 26px; }
.avatar--accent { background: var(--color-accent-soft); color: var(--color-accent-dark); }
.avatar--info { background: var(--info-soft); color: var(--info-dark); }
.avatar--neutral { background: var(--bg-sunken); color: var(--text-secondary); }

/* -------------------------------- TABS ----------------------------------- */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--radius-full); background: var(--bg-sunken); border: 0; }
.tab { display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; min-height: 36px; border-radius: var(--radius-full); font-size: 14px; font-weight: 700; color: var(--text-secondary); cursor: pointer; background: none; border: none; transition: color .15s ease, background .15s ease, box-shadow .15s ease; }
.tab:hover { color: var(--text-primary); }
.tab--active { color: var(--text-primary); font-weight: 800; background: var(--bg-card); box-shadow: 0 1px 3px rgba(43,35,56,.12); }
.tab:disabled { color: var(--text-faint); cursor: not-allowed; }

/* ---------------------------- PROGRESS / STEPPER ------------------------- */
.progress { height: 10px; border-radius: var(--radius-full); background: var(--bg-sunken); overflow: hidden; }
.progress__bar { height: 100%; border-radius: var(--radius-full); background: var(--color-primary); transition: width .3s ease; }
.progress--sm { height: 6px; }

.stepper { display: flex; align-items: center; }
.stepper__dot { width: 30px; height: 30px; border-radius: var(--radius-full); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; background: var(--bg-card); border: 2px solid var(--border-strong); color: var(--text-muted); }
.stepper__dot--done { background: var(--color-accent); border-color: var(--color-accent); color: var(--text-primary); }
.stepper__dot--current { background: var(--color-primary); border-color: var(--color-primary); color: #fff; box-shadow: 0 0 0 4px var(--color-primary-soft); }
.stepper__line { flex: 1; height: 2.5px; background: var(--border-strong); }
.stepper__line--done { background: var(--color-primary); }

/* -------------------------------- TABLE ---------------------------------- */
.table { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.table__head, .table__row { display: grid; gap: 16px; align-items: center; padding: 14px 22px; }
.table__head { background: #FAF8FD; border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.table__row { border-bottom: 1px solid var(--border); }
.table__row:last-child { border-bottom: none; }
.table__row--link { cursor: pointer; transition: background .12s ease; }
.table__row--link:hover { background: #FAF8FD; }
.cell-strong { font-weight: 800; font-size: 14px; }
.cell-sub { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.chevron { color: var(--text-faint); }

/* score mini bar */
.score { display: flex; align-items: center; gap: 8px; }
.score__num { font-weight: 800; font-size: 15px; }
.score__track { width: 44px; height: 6px; border-radius: var(--radius-full); background: var(--bg-sunken); overflow: hidden; }
.score__fill { display: block; height: 100%; background: var(--success); }

/* -------------------------------- MODAL ---------------------------------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(43,35,56,.45); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 100; }
.modal { background: var(--bg-card); border-radius: var(--radius-xl); padding: 28px; width: 100%; max-width: 400px; box-shadow: var(--shadow-overlay); }
.modal__icon { width: 48px; height: 48px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
dialog.mm-dialog { border: 0; margin: auto; color: var(--text-primary); width: calc(100% - 32px); max-width: 440px; max-height: calc(100dvh - 48px); overflow: auto; }
dialog.mm-dialog::backdrop { background: rgba(43,35,56,.45); }

/* -------------------------------- TOAST ---------------------------------- */
.toast-region { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 12px; z-index: 200; max-width: 380px; }
.toast { display: flex; gap: 12px; align-items: center; padding: 13px 15px; border-radius: var(--radius-lg); background: var(--bg-card); border: 1px solid var(--border); box-shadow: var(--shadow-elevated); }
.toast__icon { width: 32px; height: 32px; border-radius: var(--radius-full); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.toast--success .toast__icon { background: var(--success-soft); color: var(--success-dark); }
.toast--error .toast__icon   { background: var(--error-soft);   color: var(--error-dark); }
.toast--info .toast__icon    { background: var(--info-soft);    color: var(--info-dark); }
.toast__title { font-weight: 800; font-size: 14px; }
.toast__msg { font-size: 13px; color: var(--text-muted); }

/* ------------------------------- SKELETON -------------------------------- */
.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--bg-sunken) 25%, #F5F2FA 37%, var(--bg-sunken) 63%); background-size: 200% 100%; animation: mm-shimmer 1.4s infinite; }
.skeleton--text { height: 13px; }
.skeleton--circle { border-radius: var(--radius-full); }
@keyframes mm-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ------------------------------ EMPTY STATE ------------------------------ */
.empty { border: 2px dashed var(--border-strong); border-radius: var(--radius-xl); padding: 48px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.empty__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--bg-card); border: 0; color: var(--color-primary); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; box-shadow: var(--shadow-card); }

/* --------------------------------- CHAT ---------------------------------- */
.chat { display: flex; flex-direction: column; min-height: 0; }
.chat__header { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--bg-card); flex-shrink: 0; }
.chat__title { font-weight: 800; font-size: 15px; }
.chat__sub { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.chat__presence { font-size: 12px; color: var(--color-accent-dark); font-weight: 700; display: flex; align-items: center; gap: 5px; }
.chat__presence::before { content: ""; width: 7px; height: 7px; border-radius: var(--radius-full); background: var(--color-accent); }
.chat__log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: var(--bg-app); }
.chat__daysep { align-self: center; font-size: 11px; font-weight: 700; color: var(--text-muted); background: var(--bg-sunken); padding: 4px 12px; border-radius: var(--radius-full); }

.bubble { max-width: 78%; padding: 12px 16px; border-radius: 20px; font-size: 15px; line-height: 1.45; }
.bubble-in { align-self: flex-start; display: flex; gap: 10px; align-items: flex-end; max-width: 82%; }
.bubble-in .bubble { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px 20px 20px 6px; }
.bubble-out { align-self: flex-end; max-width: 82%; text-align: right; }
.bubble-out .bubble { background: var(--color-primary); color: #fff; border-radius: 20px 20px 6px 20px; text-align: left; display: inline-block; }
.bubble__time { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.bubble-out .bubble__time { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }

/* typing indicator */
.typing { align-self: flex-start; background: var(--bg-card); border: 1px solid var(--border); padding: 14px 16px; border-radius: 20px 20px 20px 6px; display: inline-flex; gap: 5px; }
.typing span { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--text-faint); animation: mm-type 1.3s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes mm-type { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* composer */
.composer { flex-shrink: 0; padding: 12px 16px; background: var(--bg-card); border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.composer .input { border-radius: var(--radius-full); height: 48px; }
.composer__send { width: 48px; height: 48px; border: none; border-radius: var(--radius-full); background: var(--color-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; transition: background .15s ease; box-shadow: var(--shadow-primary); }
.composer__send:hover { background: var(--color-primary-dark); }
.composer__send:disabled { background: #E6CFDB; cursor: not-allowed; box-shadow: none; }

/* ============================ LAYOUTS ==================================== */

/* Candidate: centered mobile-first column */
.candidate-shell { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg-app); }
.candidate-main { width: 100%; max-width: 460px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; }
.candidate-topbar { display: flex; align-items: center; gap: 12px; padding: 16px 20px; font-weight: 800; }
.candidate-content { flex: 1; padding: 8px 20px 24px; }
.candidate-footer { position: sticky; bottom: 0; background: var(--bg-app); border-top: 1px solid var(--border); padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); }
.candidate-footer .candidate-main { max-width: 460px; }

/* Offer reading surfaces: comfortable line lengths and consistent text spacing. */
.offer-page { width: 100%; max-width: 900px; margin: 0 auto; }
.offer-page #offer-title, .application-page #title { line-height: 1.3; overflow-wrap: anywhere; }
.offer-description {
  min-width: 0; max-width: 72ch; margin: 12px 0 24px;
  color: var(--text-secondary); font-size: 15px; line-height: 1.65;
  text-align: start; overflow-wrap: anywhere;
}
.offer-description p { margin: 0 0 .65em; white-space: pre-line; }
.offer-description h3 { margin: 1.2em 0 .5em; color: var(--text-primary); font-size: 16px; font-weight: 800; line-height: 1.45; }
.offer-description ul, .offer-description ol { margin: 0 0 .75em; padding-inline-start: 1.2em; }
.offer-description li { margin: 0 0 .35em; padding-inline-start: 0; }
.offer-description > :first-child { margin-top: 0; }
.offer-description > :last-child { margin-bottom: 0; }
.offer-editor { min-width: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-card); overflow: hidden; }
.offer-editor:focus-within { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.offer-editor__toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); background: var(--bg-app); }
.offer-editor__tool { min-width: 34px; min-height: 34px; padding: 6px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text-secondary); font: 700 13px/1.3 var(--font-body); cursor: pointer; }
.offer-editor__tool:hover, .offer-editor__tool[aria-pressed="true"] { background: var(--color-primary-soft); color: var(--color-primary-text); }
.offer-editor__content.offer-description { min-height: 220px; max-width: none; margin: 0; padding: 16px; outline: none; }
.offer-editor__content:empty::before { content: attr(data-placeholder); color: var(--text-muted); pointer-events: none; }
.application-page .candidate-main { max-width: 800px; min-width: 0; }
.application-page .candidate-topbar { padding: 20px 28px; }
.application-page .candidate-content { padding: 8px 28px 28px; }
.application-page .candidate-footer { padding-inline: 28px; }
.application-description { margin: 20px 0 24px; }
.application-description .offer-description { margin: 10px 0 12px; }
@media (max-width: 600px) {
  .application-page .candidate-topbar { padding: 14px 20px; }
  .application-page .candidate-content { padding: 8px 20px 24px; }
  .application-page .candidate-footer { padding-inline: 20px; }
}

/* icon button (back etc.) */
.iconbtn { width: 40px; height: 40px; border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--bg-card); display: inline-flex; align-items: center; justify-content: center; color: var(--text-primary); cursor: pointer; flex-shrink: 0; box-shadow: var(--shadow-card); }
.iconbtn:hover { background: var(--bg-sunken); }
.iconbtn--bare { border: none; background: transparent; color: var(--text-muted); box-shadow: none; }

/* Full-height chat page */
.chat-page { height: 100dvh; display: flex; flex-direction: column; }
.chat-page .chat { flex: 1; min-height: 0; }
.chat-page .chat__log-wrap { width: 100%; max-width: 720px; margin: 0 auto; }

/* Company: app shell with a floating sidebar card */
.app { min-height: 100dvh; display: flex; gap: var(--shell-gap); padding: var(--shell-gap); background: var(--bg-app); }
.sidebar { width: var(--sidebar-w); background: var(--bg-card); border: 0; border-radius: var(--radius-xl); display: flex; flex-direction: column; flex-shrink: 0; position: sticky; top: var(--shell-gap); height: calc(100dvh - var(--shell-gap) * 2); box-shadow: var(--shadow-card); }
.sidebar--admin { background: var(--text-primary); }
.sidebar__brand { padding: 24px 22px 20px; display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.sidebar__brand > span:first-child { border-radius: 50% !important; width: 36px !important; height: 36px !important; }
.sidebar--admin .sidebar__brand { color: #fff; }
.sidebar__nav { padding: 0 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.navlink { display: flex; align-items: center; gap: 12px; padding: 0 14px; min-height: 46px; border-radius: var(--radius-full); color: var(--text-secondary); font-size: 14px; font-weight: 700; cursor: pointer; transition: background .12s ease, color .12s ease; }
.navlink:hover { background: var(--bg-app); color: var(--text-primary); }
.navlink--active { background: var(--color-primary); color: #fff; font-weight: 800; }
.navlink--active:hover { background: var(--color-primary-dark); color: #fff; }
.sidebar--admin .navlink { color: #B7AEC4; }
.sidebar--admin .navlink:hover { background: #3A3044; color: #fff; }
.sidebar--admin .navlink--active { background: #3A3044; color: #fff; }
.sidebar__foot { margin: 14px; padding: 14px; border-top: 0; border-radius: var(--radius-lg); background: var(--bg-app); display: flex; align-items: center; gap: 11px; }
.sidebar__foot > div { min-width: 0; }
.sidebar__foot > div > div:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 800 !important; }
.sidebar__foot .avatar--sm { width: 36px; height: 36px; font-size: 13px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 12px 8px 8px; border-bottom: 0; background: transparent; }
.page { padding: 16px 8px 24px; }
.candidate-dashboard { width: 100%; max-width: 980px; margin: 0 auto; }
.candidate-dashboard > .tabs,
.candidate-dashboard > .mm-col,
.candidate-dashboard > .empty { width: 100%; }
.crumbs { font-size: 14px; color: var(--text-muted); font-weight: 600; }
.crumbs strong { color: var(--text-primary); font-weight: 800; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--bg-card); border: 0; border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-card); }
.stat__label { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.stat__value { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }

.form-section { display: grid; grid-template-columns: 220px 1fr; gap: 28px; }
.form-section__aside h2 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.form-section__aside p { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.4; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--radius-full); background: var(--color-accent-soft); color: var(--color-accent-dark); font-size: 13px; font-weight: 700; }
.chip button { background: none; border: none; color: inherit; cursor: pointer; display: inline-flex; padding: 0; }
.chip--add { background: var(--bg-card); border: 1.5px dashed var(--border-strong); color: var(--text-secondary); cursor: pointer; }

/* Tablero por columnas (ofertas del reclutador, candidaturas del candidato) */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; align-items: start; }
.board__col { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--radius-xl); background: var(--tint-lilac); }
.board__col--peach { background: var(--tint-peach); }
.board__col--mint { background: var(--tint-mint); }
.board__col--lilac { background: var(--tint-lilac); }
.board__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; }
.board__head h2 { margin: 0; font-size: 16px; font-weight: 800; color: var(--tint-lilac-text); }
.board__col--peach .board__head h2 { color: var(--tint-peach-text); }
.board__col--mint .board__head h2 { color: var(--tint-mint-text); }
.board__count { min-width: 28px; height: 28px; padding: 0 8px; border-radius: var(--radius-full); background: var(--bg-card); color: inherit; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.board__col--peach .board__count { background: var(--color-accent); color: var(--text-primary); }
.board__card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--shadow-card); color: var(--text-primary); transition: transform .12s ease, box-shadow .12s ease; }
a.board__card:hover { transform: translateY(-1px); box-shadow: var(--shadow-elevated); }
.board__card--muted { color: var(--text-muted); }
.board__card--muted .board__title { color: var(--text-secondary); }
.board__card--dashed { background: transparent; box-shadow: none; border: 2px dashed var(--border-strong); }
.board__title { font-size: 16px; font-weight: 800; line-height: 1.3; }
.board__sub { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.board__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.board__chips .badge { min-height: 30px; font-size: 13px; }
.board__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.board__action { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--color-primary); }
.board__empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; border-radius: var(--radius-lg); border: 2px dashed rgba(43,35,56,.14); color: var(--text-secondary); text-align: center; font-size: 13px; font-weight: 700; }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .avatar { width: 30px; height: 30px; font-size: 11px; border: 2px solid #fff; }
.avatar-stack .avatar + .avatar { margin-left: -8px; }
.avatar-stack > span:last-child:not(.avatar) { margin-left: 8px; font-size: 12px; color: var(--text-muted); font-weight: 700; }

/* ------------------------------ DOC LIST --------------------------------- */
.doc-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.doc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.doc-counter { font-size: 12px; font-weight: 800; color: var(--color-primary-text); background: var(--color-primary-soft); padding: 3px 10px; border-radius: var(--radius-full); }

.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-md);
  background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.doc-item__icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-primary-soft); color: var(--color-primary);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.doc-item__icon svg { width: 18px; height: 18px; }
.doc-item__info { flex: 1; min-width: 0; }
.doc-item__name { font-size: 14px; font-weight: 800; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-item__date { font-size: 12px; color: var(--text-muted); }
.doc-item__del {
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: transparent; color: var(--text-muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s ease, color .12s ease; flex-shrink: 0;
}
.doc-item__del:hover { background: var(--error-soft); color: var(--error-dark); }

.doc-upload-btn {
  width: 100%; height: 48px; padding: 0 16px; border-radius: var(--radius-full);
  border: 2px dashed var(--color-primary); background: var(--bg-card);
  color: var(--color-primary-text); font: 800 14px var(--font-body);
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.doc-upload-btn:hover { background: var(--color-primary-soft); border-color: var(--color-primary-dark); }
.doc-upload-btn:disabled { opacity: .5; cursor: not-allowed; border-color: var(--border-strong); background: var(--bg-app); color: var(--text-muted); }
.doc-upload-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ============================ RESPONSIVE ================================= */
.mm-menu-btn { display: none; }
.mm-menu-btn--floating { position: fixed; left: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 44; width: 48px; height: 48px; background: var(--color-primary); color: #fff; border: 0; box-shadow: var(--shadow-primary); }

@media (max-width: 900px) {
  .app { padding: 0; gap: 0; }
  .sidebar { position: fixed; z-index: 50; top: 0; left: 0; height: 100dvh; border-radius: 0 var(--radius-xl) var(--radius-xl) 0; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-overlay); }
  .topbar { padding: 16px 20px 8px; }
  .page { padding: 12px 20px 24px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-section { grid-template-columns: 1fr; gap: 12px; }
  .mm-menu-btn { display: inline-flex; }
  .sidebar-overlay.is-open { display: block; }
}

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(43,35,56,.38); z-index: 45; }
@media (max-width: 560px) {
  :root { --fs-display: 30px; --fs-h1: 24px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .page { padding: 12px 16px 24px; }
  .topbar { padding: 14px 16px 6px; }
  .table__head { display: none; }
  .table__row { grid-template-columns: 1fr auto !important; gap: 8px; }
  .matching-priorities fieldset { grid-template-columns: 1fr; }
}

/* Touch targets ≥ 44px on coarse pointers */
@media (pointer: coarse) {
  .tab, .navlink { min-height: 44px; }
}
/* Application score breakdown */
.application-score { text-align:center; }
.application-score__ring { --size:142px; width:var(--size); height:var(--size); margin:0 auto 8px; border-radius:50%; background:conic-gradient(var(--color-primary) calc(var(--score) * 1%), var(--border) 0); display:grid; place-items:center; position:relative; }
.application-score__ring::before { content:''; position:absolute; inset:10px; border-radius:50%; background:var(--surface, #fff); }
.application-score__ring span { position:relative; font-family:var(--font-display); font-size:40px; font-weight:800; color:var(--text-primary); }
.application-score--small .application-score__ring { --size:82px; }
.application-score--small .application-score__ring::before { inset:7px; }
.application-score--small .application-score__ring span { font-size:24px; }
.application-scores__parts { display:flex; justify-content:center; gap:24px; margin-top:18px; }

/* ============================ board extras ============================== */
/* Etiquetas de oferta, responsable y bandas de agrupación del tablero.
   Solo se añade aquí; no se tocan las reglas anteriores. */
.tag-chip {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 24px; padding: 3px 10px; border-radius: var(--radius-full);
  background: var(--bg-sunken); color: var(--text-secondary);
  font-size: 12px; font-weight: 800; line-height: 1.2; white-space: nowrap;
}
.tag-chip::before { content: ""; width: 7px; height: 7px; border-radius: var(--radius-full); background: currentColor; opacity: .75; flex-shrink: 0; }
.tag-chip--peach { background: var(--tint-peach); color: var(--tint-peach-text); }
.tag-chip--mint  { background: var(--tint-mint);  color: var(--tint-mint-text); }
.tag-chip--lilac { background: var(--tint-lilac); color: var(--tint-lilac-text); }
.tag-chip--sun   { background: var(--tint-sun);   color: var(--tint-sun-text); }
.tag-chip--plum  { background: var(--color-primary-soft); color: var(--color-primary-text); }
.tag-chip--info  { background: var(--info-soft);  color: var(--info-dark); }
.tag-chip--lg { min-height: 32px; padding: 5px 13px; font-size: 13px; }
.tag-chip button { background: none; border: none; color: inherit; cursor: pointer; display: inline-flex; padding: 0; margin-left: 2px; opacity: .7; }
.tag-chip button:hover { opacity: 1; }
.tag-chip--btn { cursor: pointer; border: 1.5px solid transparent; min-height: 32px; padding: 5px 13px; font-size: 13px; font-family: inherit; transition: box-shadow .12s ease, border-color .12s ease; }
.tag-chip--btn:hover { border-color: rgba(43,35,56,.18); }
.tag-chip--btn.is-on { background: var(--color-primary); color: #fff; border-color: var(--color-primary); box-shadow: var(--shadow-primary); }
.tag-chip--btn.is-on::before { background: #fff; opacity: .9; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Muestra de color (selector de color de etiqueta y lista de etiquetas) */
.tag-swatch { width: 26px; height: 26px; border-radius: var(--radius-full); border: 2px solid transparent; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tag-swatch--peach { background: var(--tint-peach); color: var(--tint-peach-text); }
.tag-swatch--mint  { background: var(--tint-mint);  color: var(--tint-mint-text); }
.tag-swatch--lilac { background: var(--tint-lilac); color: var(--tint-lilac-text); }
.tag-swatch--sun   { background: var(--tint-sun);   color: var(--tint-sun-text); }
.tag-swatch--plum  { background: var(--color-primary-soft); color: var(--color-primary-text); }
.tag-swatch--info  { background: var(--info-soft);  color: var(--info-dark); }
.tag-swatch::after { content: ""; width: 10px; height: 10px; border-radius: var(--radius-full); background: currentColor; }
.tag-swatch.is-on { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(122,59,98,.16); }
.tag-swatch--static { cursor: default; }
.tag-swatches { display: inline-flex; gap: 6px; align-items: center; }

/* Responsable en tarjetas y filas */
.owner { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.owner .avatar { width: 24px; height: 24px; font-size: 10px; }
.owner > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.owner--none { color: var(--text-faint); font-weight: 600; }

/* Avisos de espera en «Necesitan tu revisión» */
.board__stale { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--color-accent-dark); }
.board__stale svg { flex-shrink: 0; }
.board__wait { font-size: 13px; font-weight: 600; color: var(--text-muted); }

/* Bandas de agrupación (una por etiqueta / responsable) */
.board-bands { display: flex; flex-direction: column; gap: 22px; }
.board-band__head { display: flex; align-items: center; gap: 10px; padding: 2px 6px 10px; }
.board-band__head h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.board-band__count { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.board__more { display: inline-flex; align-items: center; gap: 6px; align-self: center; padding: 6px 12px; border-radius: var(--radius-full); font-size: 13px; font-weight: 800; color: var(--tint-lilac-text); background: rgba(255,255,255,.6); }
.board__more:hover { background: var(--bg-card); }

/* Barra de filtros del tablero */
.board-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 0 0 18px; }
.board-toolbar__group { display: inline-flex; align-items: center; gap: 10px; }
.board-toolbar__label { font-size: 13px; font-weight: 800; color: var(--text-muted); white-space: nowrap; }
.board-toolbar .select { height: 40px; padding: 0 36px 0 14px; font-size: 14px; font-weight: 700; width: auto; }
.board-toolbar .select-wrap::after { right: 15px; }
.board-toolbar .tab { padding: 0 14px; }
.board-toolbar .tab small { font-weight: 700; color: var(--text-muted); margin-left: 4px; }
.board-toolbar .tab--active small { color: var(--color-primary); }
