/* ---- NAV ---- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 15px;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--fg);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--accent);
  color: #0a0e17;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}

.nav-cta:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ---- APP PAGE SHELL ---- */
.app-shell {
  min-height: 100vh;
  padding-top: 64px;
}

.app-header {
  padding: 56px 24px 40px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg) 100%);
}

.app-header-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.app-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 8px;
}

.app-subtitle {
  font-size: 16px;
  color: var(--fg-muted);
}

/* ---- FORM PAGE ---- */
.form-page {
  padding: 48px 24px;
}

.form-page-inner {
  max-width: 680px;
  margin: 0 auto;
}

.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}

.form-section-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

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

.form-grid.full {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.span-2 {
  grid-column: span 2;
}

.form-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.form-label .req {
  color: var(--accent);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--fg-dim);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b95a8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

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

.form-hint {
  font-size: 12px;
  color: var(--fg-dim);
  margin-top: -4px;
}

.form-divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #0a0e17;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: 0.01em;
}

.submit-btn:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.25);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ---- SUCCESS TOAST ---- */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 200;
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: 360px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.toast-text {
  font-size: 14px;
  color: var(--fg);
  line-height: 1.5;
}

.toast-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

/* ---- SHIFTS LIST PAGE ---- */
.shifts-page {
  padding: 48px 24px;
}

.shifts-page-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.shifts-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.shifts-count {
  font-size: 14px;
  color: var(--fg-muted);
}

.shifts-count strong {
  color: var(--fg);
}

.post-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--accent);
  color: #0a0e17;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}

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

.shifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.shift-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
  display: block;
}

.shift-card:hover {
  border-color: rgba(0, 212, 170, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.shift-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.shift-role {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.shift-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-display);
}

.shift-badge.open {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(0, 212, 170, 0.25);
}

.shift-facility {
  font-size: 15px;
  color: var(--fg-muted);
  margin-bottom: 16px;
}

.shift-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.shift-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--fg-muted);
}

.shift-meta-icon {
  font-size: 15px;
  flex-shrink: 0;
}

.shift-creds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.cred-tag {
  padding: 3px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--fg-muted);
}

.shift-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.match-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--accent);
}

.match-count .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.view-matches-link {
  font-size: 13px;
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.view-matches-link:hover {
  color: var(--fg);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 16px;
  color: var(--fg-muted);
  margin-bottom: 28px;
}

/* ---- MATCHES PAGE ---- */
.matches-page {
  padding: 48px 24px;
}

.matches-page-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--fg-muted);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--fg);
}

.shift-detail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 40px;
}

.shift-detail-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.shift-detail-sub {
  font-size: 16px;
  color: var(--fg-muted);
  margin-bottom: 24px;
}

.shift-detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.shift-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.detail-value {
  font-size: 15px;
  color: var(--fg);
  font-weight: 500;
}

.matches-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.matches-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.matches-subtitle {
  font-size: 14px;
  color: var(--fg-muted);
}

.candidates-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.candidate-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: start;
  transition: border-color 0.2s;
}

.candidate-card:hover {
  border-color: rgba(0, 212, 170, 0.2);
}

.candidate-rank {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--fg-dim);
  width: 28px;
  text-align: center;
  padding-top: 3px;
}

.candidate-rank.top {
  color: var(--accent);
}

.candidate-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.candidate-role {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 14px;
}

.candidate-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.fact-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-display);
}

.fact-badge.yes {
  background: rgba(0, 212, 170, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 212, 170, 0.2);
}

.fact-badge.no {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.fact-badge.neutral {
  background: var(--bg-elevated);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.candidate-creds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.score-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 72px;
}

.score-circle {
  position: relative;
  width: 64px;
  height: 64px;
}

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

.score-circle-bg {
  fill: none;
  stroke: var(--bg-elevated);
  stroke-width: 5;
}

.score-circle-fill {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.score-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.score-label {
  font-size: 11px;
  color: var(--fg-dim);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.no-matches {
  text-align: center;
  padding: 60px 24px;
}

.no-matches-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.no-matches h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.no-matches p {
  font-size: 15px;
  color: var(--fg-muted);
}

/* ---- LOADING SKELETON ---- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-surface) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-links .nav-link { display: none; }

  .form-card { padding: 24px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span-2 { grid-column: span 1; }

  .shifts-grid { grid-template-columns: 1fr; }

  .candidate-card {
    grid-template-columns: auto 1fr;
  }

  .score-panel {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
}
