/* Hiring Hub — Baker Implement */

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

body {
  background: var(--bds-bg-0, #000);
  color: var(--bds-text-1, #e5e5e5);
  font-family: var(--bds-font-stack, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100svh;
}

/* Login screen — matches Tool Inventory */
.login-screen {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 24px;
  background:
    linear-gradient(135deg, rgba(200,16,46,0.12) 0%, rgba(200,16,46,0.05) 15%, transparent 35%),
    linear-gradient(315deg, rgba(200,16,46,0.08) 0%, rgba(200,16,46,0.03) 10%, transparent 30%),
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(200,16,46,0.07) 59px, rgba(200,16,46,0.07) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(200,16,46,0.07) 59px, rgba(200,16,46,0.07) 60px),
    radial-gradient(ellipse at center, #1a1a1a 0%, #0d0d0d 60%, #080808 100%);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
}
.login-screen::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, transparent, transparent 39px, rgba(200,16,46,0.07) 39px, rgba(200,16,46,0.07) 40px);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 15%, rgba(0,0,0,0.3) 35%, black 65%);
  mask-image: radial-gradient(ellipse at center, transparent 15%, rgba(0,0,0,0.3) 35%, black 65%);
  pointer-events: none; z-index: 0;
}
.login-screen > * { position: relative; z-index: 1; }
.screen-header { margin-bottom: 24px; text-align: center; margin-top: -40px; }
.login-logo { width: 220px; height: auto; display: block; margin: 0 auto 16px; }
.login-tagline {
  font-size: 0.7rem; letter-spacing: 2.5px; text-transform: uppercase;
  margin: 0 0 16px; font-weight: 700;
  background: linear-gradient(180deg, #e8e8e8 0%, #c0c0c0 25%, #8a8a8a 50%, #a8a8a8 75%, #d0d0d0 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.login-title { font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 4px; color: #fff; }
.login-subtitle { font-size: 13px; color: #999; text-align: center; margin-top: 6px; margin-bottom: 28px; }
.login-card { width: 100%; max-width: 340px; }
.login-card + .login-card { margin-top: 12px; }
.phone-input {
  width: 100%; min-height: 56px; border-radius: 10px;
  border: 1px solid #333; background: #252525;
  color: #fff; text-align: center; font-size: 1.35rem;
  letter-spacing: 1.5px; margin-bottom: 16px; outline: none; font-family: inherit;
  padding: 0 16px;
}
.phone-input:focus { border-color: #c8102e; }
.phone-input::placeholder { color: #666; }
.pin-row {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px; margin-bottom: 12px;
}
.pin-input {
  min-height: 56px; border-radius: 10px;
  border: 1px solid #333; background: #252525;
  color: #fff; text-align: center; font-size: 1.25rem;
  font-family: inherit; outline: none;
}
.pin-input:focus { border-color: #c8102e; }
.pin-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn {
  width: 100%; padding: 18px 24px; border: none; border-radius: 10px;
  font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer;
  transition: all 0.2s; min-height: 54px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  -webkit-tap-highlight-color: rgba(200,16,46,0.2); touch-action: manipulation;
}
.btn-primary { background: #c8102e; color: #fff; }
.btn-primary:active { background: #a60d25; }
.btn-secondary { background: #252525; color: #fff; border: 1px solid #333; }
.login-footer {
  position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
  text-align: center; pointer-events: none;
}
.login-caseih-logo { width: 240px; height: auto; display: block; margin: 0 auto 8px; opacity: 0.6; }
.login-confidential {
  font-size: 0.6rem; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.4);
}
.login-spinner-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 24px 0; color: #ccc;
}
.login-spinner {
  width: 36px; height: 36px;
  border: 3px solid #333; border-top-color: #c8102e;
  border-radius: 50%; animation: loginSpin 0.8s linear infinite;
}
@keyframes loginSpin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,0,0,0.85);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bds-border, #1a1a1a);
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
}
.nav__refresh {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--bds-border, #333);
  border-radius: 8px;
  color: #999;
  cursor: pointer;
  transition: transform 0.3s;
}
.nav__refresh:active { color: #fff; }
.nav__refresh.spinning { animation: spin 0.8s linear; }
@keyframes spin { to { transform: rotate(360deg); } }
.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
  height: 56px;
}
.nav__left { display: flex; align-items: center; gap: 12px; }
.nav__logo { height: 32px; width: auto; opacity: 0.9; }
.nav__titles { display: flex; flex-direction: column; }
.nav__title { font-size: 16px; font-weight: 700; color: #fff; line-height: 1.2; }
.nav__store { font-size: 11px; font-weight: 600; color: var(--bds-accent, #c8102e); letter-spacing: 0.04em; }
.nav__right { display: flex; align-items: center; gap: 10px; }
.nav__store-select {
  background: var(--bds-bg-2, #1a1a1a);
  border: 1px solid var(--bds-border, #252525);
  border-radius: 8px;
  color: var(--bds-text-1);
  font-size: 13px;
  padding: 6px 10px;
  font-weight: 600;
}
.nav__avatar {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bds-bg-2, #1a1a1a);
  border: 1px solid var(--bds-border, #252525);
  color: var(--bds-text-3, #666);
  cursor: pointer;
}

/* Main */
.main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 80px;
}

/* Stats row */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.stat {
  background: var(--bds-bg-1, #111);
  border: 1.5px solid var(--bds-border, #1f1f1f);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.stat:active { transform: scale(0.96); }
.stat--active { border-color: var(--bds-accent, #c8102e); }
.stat__num {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat__num--red { color: var(--bds-accent, #c8102e); }
.stat__num--blue { color: #3b82f6; }
.stat__num--yellow { color: #f59e0b; }
.stat__num--green { color: #22c55e; }
.stat__label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bds-text-3, #666);
  font-weight: 700;
  margin-top: 6px;
}

/* List header */
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 2px;
}
.list-header__label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bds-accent, #c8102e);
  font-weight: 700;
}
.list-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.list-header__sort {
  font-size: 11px;
  color: var(--bds-text-3, #555);
}
.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bds-bg-2, #1a1a1a);
  border: 1px solid var(--bds-border, #252525);
  color: var(--bds-text-3, #888);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.export-btn:hover {
  border-color: var(--bds-border-strong, #444);
  color: var(--bds-text-1, #e5e5e5);
}

/* Candidate card */
.candidate {
  background: var(--bds-bg-1, #111);
  border: 1px solid var(--bds-border, #1f1f1f);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.candidate:active { transform: scale(0.99); }
.candidate:hover { border-color: var(--bds-border-strong, #333); }

.candidate__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.candidate__name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.candidate__meta {
  font-size: 12px;
  color: var(--bds-text-3, #777);
  margin-top: 2px;
}

/* Score badge */
.score {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.score--high { background: rgba(34,197,94,0.12); color: #22c55e; }
.score--medium { background: rgba(245,158,11,0.12); color: #f59e0b; }
.score--low { background: rgba(200,16,46,0.12); color: #f87171; }

/* Flag pills */
.flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.flag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bds-bg-2, #1a1a1a);
  color: var(--bds-text-3, #999);
  border: 1px solid var(--bds-border, #252525);
}
.flag--good { background: rgba(34,197,94,0.1); color: #4ade80; border-color: rgba(34,197,94,0.2); }
.flag--warn { background: rgba(245,158,11,0.1); color: #fbbf24; border-color: rgba(245,158,11,0.2); }
.flag--great { background: rgba(200,16,46,0.1); color: #f87171; border-color: rgba(200,16,46,0.2); }

/* AsIst summary */
.asist {
  background: var(--bds-bg-0, #0a0a0a);
  border: 1px solid var(--bds-border, #1a1a1a);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--bds-text-2, #aaa);
  line-height: 1.55;
}
.asist__label {
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bds-accent, #c8102e);
  font-weight: 700;
  margin-bottom: 4px;
}
.asist strong { color: var(--bds-text-1, #e5e5e5); }

/* Action buttons */
.actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.btn-action {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-action:active { transform: scale(0.96); }
.btn-action--call { background: var(--bds-accent, #c8102e); color: #fff; }
.btn-action--ghost {
  background: transparent;
  border: 1px solid var(--bds-border, #333);
  color: var(--bds-text-2, #aaa);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}
.empty-state__icon { color: var(--bds-text-3, #444); margin-bottom: 16px; }
.empty-state__text { font-size: 18px; font-weight: 700; color: var(--bds-text-2, #aaa); }
.empty-state__sub { font-size: 13px; color: var(--bds-text-3, #555); margin-top: 8px; line-height: 1.5; }

/* Detail panel */
.candidate-detail {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.candidate-detail[aria-hidden="false"] {
  pointer-events: auto;
  opacity: 1;
}
.detail__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.detail__sheet {
  position: relative;
  background: var(--bds-bg-1, #111);
  border: 1px solid var(--bds-border-strong, #333);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 720px;
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 20px 40px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.candidate-detail[aria-hidden="false"] .detail__sheet {
  transform: translateY(0);
}
.detail__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bds-bg-2, #1a1a1a);
  border: 1px solid var(--bds-border, #252525);
  border-radius: 50%;
  color: var(--bds-text-2);
  cursor: pointer;
}

/* Detail sections */
.detail__section {
  margin-bottom: 20px;
}
.detail__section-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bds-accent, #c8102e);
  font-weight: 700;
  margin-bottom: 10px;
}
.detail__row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--bds-border, #1a1a1a);
  font-size: 14px;
}
.detail__row-label { color: var(--bds-text-3, #777); }
.detail__row-value { color: var(--bds-text-1, #e5e5e5); font-weight: 600; text-align: right; }

.detail__status-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bds-bg-2, #1a1a1a);
  border: 1px solid var(--bds-border, #252525);
  border-radius: 10px;
  color: var(--bds-text-1);
  font-size: 14px;
  font-weight: 600;
}

.detail__notes-input {
  width: 100%;
  min-height: 80px;
  padding: 12px 14px;
  background: var(--bds-bg-2, #1a1a1a);
  border: 1px solid var(--bds-border, #252525);
  border-radius: 10px;
  color: var(--bds-text-1);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
.detail__notes-input::placeholder { color: var(--bds-text-3, #555); }

/* Outreach email prompt */
.outreach-prompt {
  margin: 12px 0;
  animation: fadeSlideIn 0.25s ease-out;
}
.outreach-prompt__inner {
  background: var(--bds-bg-2, #1a1a1a);
  border: 1px solid #c8102e44;
  border-radius: 12px;
  padding: 16px;
}
.outreach-prompt__text {
  font-size: 14px;
  color: var(--bds-text-1, #e5e5e5);
  margin-bottom: 4px;
}
.outreach-prompt__sub {
  font-size: 12px;
  color: var(--bds-text-3, #888);
  margin-bottom: 12px;
}
.outreach-prompt__actions {
  display: flex;
  gap: 10px;
}
.outreach-prompt__skip {
  flex: 1;
  min-height: 40px;
  background: var(--bds-bg-3, #252525);
  border: 1px solid var(--bds-border, #333);
  color: var(--bds-text-2, #aaa);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.outreach-prompt__send {
  flex: 1;
  min-height: 40px;
  background: #c8102e;
  border: none;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.outreach-prompt__send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.outreach-prompt__preview {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  background: #111;
  border: 1px solid #333;
  border-left: 3px solid #c8102e;
  border-radius: 0 6px 6px 0;
  color: #e5e5e5;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  margin-top: 8px;
}
.outreach-prompt__preview:focus {
  outline: none;
  border-color: #c8102e;
}
.outreach-prompt__warn {
  font-size: 13px;
  color: #f59e0b;
  margin: 8px 0;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* User dropdown menu */
.user-dropdown {
  position: fixed;
  top: 56px;
  right: 12px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 16px;
  min-width: 200px;
  z-index: 9999;
  box-shadow: 0 12px 40px rgba(0,0,0,0.8);
  animation: fadeSlideIn 0.15s ease-out;
}
.user-dropdown__name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.user-dropdown__role {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
.user-dropdown__store {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}
.user-dropdown__divider {
  height: 1px;
  background: var(--bds-border, #333);
  margin: 12px 0;
}
.user-dropdown__logout {
  width: 100%;
  padding: 10px;
  background: none;
  border: 1px solid #c8102e;
  border-radius: 8px;
  color: #c8102e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.user-dropdown__logout:active {
  background: #c8102e;
  color: #fff;
}
.nav__right { position: relative; }

/* Score-based left border on cards */
.candidate--tier-high { border-left: 3px solid #22c55e; }
.candidate--tier-mid { border-left: 3px solid #3b82f6; }
.candidate--tier-low { border-left: 3px solid #f59e0b; }
.candidate--tier-entry { border-left: 3px solid #666; }

/* New candidate pulse */
.candidate--new {
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3), 0 0 12px rgba(34, 197, 94, 0.15);
}
.candidate__new-badge {
  background: #22c55e;
  color: #000;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 3px;
  text-align: center;
  margin-bottom: 2px;
}

/* Archive stat card */
.stat--archive { opacity: 0.6; }
.stat--archive:hover { opacity: 0.8; }
.stat__num--muted { color: #666 !important; }

/* Reach Out button */
.reach-out-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  margin: 12px 0 16px;
  background: #c8102e;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.reach-out-btn:active { background: #a60d25; }
.reach-out-warn {
  margin: 12px 0 16px;
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  color: #f59e0b;
  font-size: 13px;
  text-align: center;
}

/* Activity timeline */
.activity-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.activity-log__entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: #999;
  line-height: 1.5;
}
.activity-log__dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  border-radius: 50%;
  background: #c8102e;
  margin-top: 5px;
}

/* Communication badges on cards */
.comm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 14px;
  margin-left: 4px;
}
.comm-badge--email {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}
.comm-badge--confirm {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--bds-text-3, #555);
  font-size: 14px;
}

@media (max-width: 380px) {
  .stat__num { font-size: 26px; }
  .stat { padding: 10px 6px; }
}
