/* LL-26223-02: Employer ATS composes existing cards, buttons, badges, and page canvas. */
.ats-console { display: grid; gap: 1rem; min-width: 0; }
.ats-header, .ats-section-heading, .ats-template-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.ats-header h3, .ats-section-heading h4, .ats-template-heading h4 { margin: .2rem 0 0; }
.ats-header-meta, .ats-health-context, .ats-badges { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ats-header-meta { margin-top: .65rem; color: var(--ll-color-text-muted, #52606d); font-size: .875rem; }
.ats-health, .ats-settings { border: 1px solid var(--ll-color-border, #d9e2ec); border-radius: 16px; background: var(--ll-color-surface, #fff); padding: 1rem; }
.ats-health-grid { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: .65rem; margin-top: .8rem; }
.ats-health-card { min-width: 0; padding: .8rem; border-radius: 12px; background: var(--ll-color-surface-subtle, #f4f7f9); display: grid; gap: .2rem; }
.ats-health-card span, .ats-health-card small { color: var(--ll-color-text-muted, #52606d); font-size: .75rem; }
.ats-health-card strong { font-size: 1.45rem; }
.ats-health-context { border-top: 1px solid var(--ll-color-border, #d9e2ec); margin-top: .8rem; padding-top: .7rem; font-size: .82rem; justify-content: space-between; }
.ats-operating-toolbar { display: grid; grid-template-columns: minmax(170px, 1.5fr) repeat(4, minmax(125px, 1fr)) auto; gap: .6rem; align-items: end; padding: .8rem; border: 1px solid var(--ll-color-border, #d9e2ec); border-radius: 14px; background: var(--ll-color-surface, #fff); position: sticky; top: .5rem; z-index: 5; }
.ats-operating-toolbar label, .ats-confirm label, .ats-template-stages label { display: grid; gap: .25rem; font-size: .75rem; font-weight: 700; color: var(--ll-color-text-muted, #52606d); }
.ats-operating-toolbar input, .ats-operating-toolbar select, .ats-confirm select, .ats-confirm textarea, .ats-template-card input, .ats-template-heading input { width: 100%; min-height: 40px; border: 1px solid var(--ll-color-border-strong, #b8c4ce); border-radius: 9px; background: var(--ll-color-surface, #fff); color: inherit; padding: .55rem .65rem; }
.ats-view-toggle { display: flex; border: 1px solid var(--ll-color-border-strong, #b8c4ce); border-radius: 9px; overflow: hidden; }
.ats-view-toggle button { min-height: 40px; padding: .5rem .7rem; border: 0; background: transparent; color: inherit; }
.ats-view-toggle button[aria-pressed="true"] { background: var(--ll-color-primary, #155f63); color: #fff; }
.ats-results-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; color: var(--ll-color-text-muted, #52606d); font-size: .85rem; }
.ats-results-heading strong { color: var(--ll-color-text, #132f33); }
.ats-list { display: grid; gap: .5rem; }
.ats-candidate { border: 1px solid var(--ll-color-border, #d9e2ec); border-radius: 12px; background: var(--ll-color-surface, #fff); overflow: hidden; }
.ats-candidate--overdue { border-left: 4px solid var(--ll-color-danger, #a72f2f); }
.ats-candidate__open { width: 100%; display: grid; grid-template-columns: minmax(170px, 1.1fr) minmax(220px, 1.5fr) minmax(130px, .7fr) minmax(190px, 1.2fr) auto; gap: .8rem; align-items: center; padding: .8rem .9rem; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.ats-candidate__open:hover { background: var(--ll-color-surface-subtle, #f4f7f9); }
.ats-candidate__open:focus-visible, .ats-icon-btn:focus-visible, .ats-view-toggle button:focus-visible { outline: 3px solid var(--ll-color-focus, #2f7de1); outline-offset: -3px; }
.ats-candidate__identity, .ats-candidate__timing, .ats-candidate__next { display: grid; gap: .15rem; min-width: 0; }
.ats-candidate__identity strong, .ats-candidate__next strong { overflow: hidden; text-overflow: ellipsis; }
.ats-candidate small, .ats-candidate__next small { color: var(--ll-color-text-muted, #52606d); }
.ats-sla, .ats-screening { font-size: .72rem; border-radius: 999px; padding: .25rem .45rem; background: var(--ll-color-surface-subtle, #eef3f5); }
.ats-sla--overdue { background: #fde9e8; color: #872525; font-weight: 800; }
.ats-screening--complete { background: #e3f5ec; color: #1f6a49; }
.ats-candidate__chevron { font-size: 1.5rem; color: var(--ll-color-text-muted, #52606d); }
.ats-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 310px); gap: .75rem; overflow-x: auto; padding-bottom: .75rem; scroll-snap-type: x proximity; }
.ats-board-column { scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr; gap: .5rem; border-radius: 14px; background: var(--ll-color-surface-subtle, #f4f7f9); padding: .6rem; min-height: 220px; }
.ats-board-column > header { display: flex; justify-content: space-between; padding: .35rem; }
.ats-board-column > div { display: grid; align-content: start; gap: .5rem; }
.ats-candidate--board .ats-candidate__open { grid-template-columns: 1fr auto; }
.ats-candidate--board .ats-badges, .ats-candidate--board .ats-candidate__timing, .ats-candidate--board .ats-candidate__next { grid-column: 1 / -1; }
.ats-column-empty, .ats-empty-copy { color: var(--ll-color-text-muted, #52606d); font-size: .85rem; }
.ats-detail-backdrop, .ats-confirm-backdrop { position: fixed; inset: 0; background: rgb(12 28 32 / 45%); z-index: 90; }
.ats-detail { position: fixed; z-index: 91; inset: 0 0 0 auto; width: min(560px, 94vw); background: var(--ll-color-surface, #fff); box-shadow: -16px 0 44px rgb(0 0 0 / 18%); display: grid; grid-template-rows: auto auto 1fr; }
.ats-detail > header { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--ll-color-border, #d9e2ec); }
.ats-detail > header h3, .ats-detail > header p { margin: .2rem 0; }
.ats-icon-btn { border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 1.6rem; min-width: 42px; min-height: 42px; }
.ats-detail__actions { display: flex; gap: .5rem; padding: .75rem 1.2rem; border-bottom: 1px solid var(--ll-color-border, #d9e2ec); }
.ats-detail__body { overflow-y: auto; padding: 1rem 1.2rem 2rem; display: grid; gap: 1rem; }
.ats-detail__body section { border-bottom: 1px solid var(--ll-color-border, #d9e2ec); padding-bottom: 1rem; }
.ats-detail__body h4 { margin: 0 0 .7rem; }
.ats-status-grid, .ats-current-config { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.ats-status-grid > div, .ats-current-config > div { display: grid; gap: .2rem; padding: .65rem; background: var(--ll-color-surface-subtle, #f4f7f9); border-radius: 10px; }
.ats-status-grid span, .ats-current-config span { color: var(--ll-color-text-muted, #52606d); font-size: .72rem; }
.ats-next-action { display: grid; gap: .2rem; margin-top: .65rem; padding: .75rem; border-left: 4px solid var(--ll-color-primary, #155f63); background: #edf8f7; }
.ats-stage-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.ats-text-overdue { color: var(--ll-color-danger, #a72f2f); }
.ats-answer-list { display: grid; gap: .6rem; margin: 0; }
.ats-answer-list > div { padding: .7rem; border-radius: 10px; background: var(--ll-color-surface-subtle, #f4f7f9); }
.ats-answer-list dt { font-weight: 800; }
.ats-answer-list dd { margin: .3rem 0 0; }
.ats-history { list-style: none; display: grid; gap: .7rem; padding: 0; margin: 0; }
.ats-history li { display: grid; grid-template-columns: 12px 1fr; gap: .55rem; }
.ats-history li > span { width: 9px; height: 9px; margin-top: .35rem; border-radius: 999px; background: var(--ll-color-primary, #155f63); }
.ats-history li div { display: grid; gap: .12rem; }
.ats-history small, .ats-history em { color: var(--ll-color-text-muted, #52606d); font-size: .75rem; }
.ats-private-note { color: var(--ll-color-text-muted, #52606d); font-size: .78rem; }
.ats-confirm { position: fixed; z-index: 92; width: min(480px, calc(100vw - 2rem)); top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 1.2rem; border-radius: 16px; background: var(--ll-color-surface, #fff); box-shadow: 0 24px 70px rgb(0 0 0 / 25%); display: grid; gap: .8rem; }
.ats-confirm h3, .ats-confirm p { margin: 0; }
.ats-archive-banner { display: flex; gap: .6rem; align-items: center; padding: .75rem; border-radius: 10px; background: #fff3cf; color: #5f4600; }
.ats-settings { display: grid; gap: 1rem; }
.ats-current-config { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ats-frozen-stages { display: flex; flex-wrap: wrap; gap: .4rem; }
.ats-frozen-stages span { display: flex; align-items: center; gap: .35rem; padding: .35rem .55rem; background: var(--ll-color-surface-subtle, #f4f7f9); border-radius: 999px; font-size: .78rem; }
.ats-template-heading form { display: flex; gap: .4rem; }
.ats-template-apply { display: flex; align-items: end; gap: .5rem; }
.ats-template-apply label { display: grid; flex: 1; gap: .25rem; font-size: .75rem; font-weight: 700; color: var(--ll-color-text-muted, #52606d); }
.ats-template-apply select { min-height: 40px; border: 1px solid var(--ll-color-border-strong, #b8c4ce); border-radius: 9px; background: var(--ll-color-surface, #fff); color: inherit; padding: .5rem; }
.ats-template-list { display: grid; gap: .75rem; }
.ats-template-card { border: 1px solid var(--ll-color-border, #d9e2ec); border-radius: 12px; padding: .8rem; display: grid; gap: .7rem; }
.ats-template-card > div:first-child { display: flex; gap: .5rem; align-items: center; }
.ats-template-name { font-weight: 800; }
.ats-template-stages { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: .5rem; }
.ats-purposeful-empty, .ats-filter-empty, .ats-loading { min-height: 280px; display: grid; place-content: center; justify-items: center; text-align: center; gap: .6rem; padding: 2rem; border: 1px dashed var(--ll-color-border-strong, #b8c4ce); border-radius: 14px; }
.ats-purposeful-empty h4, .ats-purposeful-empty p, .ats-loading p { margin: 0; }
.ats-loading span { width: 30px; height: 30px; border: 3px solid var(--ll-color-border, #d9e2ec); border-top-color: var(--ll-color-primary, #155f63); border-radius: 999px; animation: ats-spin .8s linear infinite; }
@keyframes ats-spin { to { transform: rotate(1turn); } }

@media (max-width: 1100px) {
  .ats-health-grid { grid-template-columns: repeat(3, minmax(100px, 1fr)); }
  .ats-operating-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); position: static; }
  .ats-search { grid-column: span 2; }
  .ats-candidate__open { grid-template-columns: minmax(160px, 1fr) minmax(200px, 1.4fr) minmax(160px, 1fr) auto; }
  .ats-candidate__timing { display: none; }
  .ats-template-stages { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}

@media (max-width: 700px) {
  .ats-header, .ats-section-heading, .ats-template-heading { align-items: stretch; flex-direction: column; }
  .ats-header .button-row { width: 100%; }
  .ats-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ats-health-context { align-items: flex-start; flex-direction: column; }
  .ats-operating-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ats-search { grid-column: 1 / -1; }
  .ats-view-toggle { grid-column: 1 / -1; }
  .ats-view-toggle button { flex: 1; }
  .ats-view-toggle button[data-ats-mode="board"] { display: none; }
  .ats-results-heading { align-items: flex-start; flex-direction: column; }
  .ats-candidate__open { grid-template-columns: minmax(0, 1fr) auto; }
  .ats-candidate__identity, .ats-badges, .ats-candidate__next { grid-column: 1 / -1; }
  .ats-candidate__chevron { grid-column: 2; grid-row: 1; }
  .ats-detail { width: 100vw; }
  .ats-detail__actions > * { flex: 1; }
  .ats-status-grid, .ats-current-config, .ats-template-stages { grid-template-columns: 1fr; }
  .ats-template-heading form, .ats-template-card > div:first-child, .ats-template-apply { align-items: stretch; flex-direction: column; }
  .ats-archive-banner { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { .ats-loading span { animation: none; } }
