\documentclass[11pt,letterpaper]{article}

% Packages
\usepackage[margin=0.20in]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[protrusion=true,expansion=false]{microtype}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{array}
\usepackage{tikz}
\usepackage{ragged2e}

\renewcommand{\familydefault}{\sfdefault}
\setlength{\parindent}{0pt}
\setlength{\tabcolsep}{0pt}
\raggedbottom
\pagestyle{empty}

\newcommand{\safegraphics}[2]{%
  \IfFileExists{#1}{\includegraphics[width=#2]{#1}}{\mbox{}}%
}

\newlength{\NameRuleLen}        \setlength{\NameRuleLen}{1.211\linewidth}   % Graduating Student Name
\newlength{\ThirdPartyRuleLen}  \setlength{\ThirdPartyRuleLen}{0.750\linewidth} % Third-Party Name
\newlength{\SigRuleLen}         \setlength{\SigRuleLen}{0.650\linewidth}    % Signature


\newcommand{\fillrule}[1]{\rule{#1}{0.6pt}}
\newcommand{\HSpace}{\hspace{0.6em}}
\newcommand{\FieldName}[1]{\textbf{#1}\HSpace\fillrule{\NameRuleLen}}
\newcommand{\FieldShort}[1]{\textbf{#1}\HSpace\fillrule{0.350\linewidth}}
\newcommand{\FieldMed}[1]{\textbf{#1}\HSpace\fillrule{0.40\linewidth}}
\newcommand{\FieldSig}[1]{\textbf{#1}\HSpace\fillrule{\SigRuleLen}}
\newcommand{\FieldDate}[1]{\textbf{#1}\HSpace\fillrule{0.20\linewidth}}

\newcommand{\BoxChoice}{\raisebox{-0.25ex}{\fbox{\rule{0pt}{1.8ex}\rule{1.8ex}{0pt}}}}
\newcommand{\RevStamp}{{\raggedleft\tiny\color{black!55}last revised 10/14/25 \,-\, S.A.\par}}

% Reusable Yes/No row
\newcommand{\YesNoRow}[1]{%
  \textbf{#1:}\HSpace
  \BoxChoice\ \textbf{No}\HSpace\HSpace\HSpace
  \BoxChoice\ \textbf{Yes}%
}

% Tight divider helper: control space above/below the rule
\newcommand{\Divider}[2]{%
  \vspace{#1}%
  {\color{black!35}\rule{\linewidth}{0.6pt}}%
  \vspace{#2}%
}

% --- Header row that stays centered with or without the logo ---
\newlength{\HeaderSideW}
\setlength{\HeaderSideW}{4.8cm}
\newcommand{\CenteredHeader}{%
  \noindent\makebox[\linewidth][c]{%
    \begin{minipage}[c]{\HeaderSideW}
      \raggedright
      \raisebox{-0.2\height}{\safegraphics{mines_wordmark.png}{5.5cm}}
    \end{minipage}%
    \begin{minipage}[c]{\dimexpr\linewidth-2\HeaderSideW\relax}
      \centering
      {\large\textbf{DIPLOMA PICKUP VERIFICATION}\par}
      {\normalsize Picture ID is required\par}
    \end{minipage}%
    \begin{minipage}[c]{\HeaderSideW}\mbox{}\end{minipage}%
  }%
}

% Card environment
\newenvironment{DiplomaCard}{
  \par\vspace{0.08in}
  \begin{tikzpicture}
    \node[
      draw=black, rounded corners=6pt, line width=0.6pt,
      inner sep=10pt, outer sep=0pt, fill=white,
      text width=\dimexpr\linewidth-20pt\relax
    ] (card) {\relax

      \CenteredHeader
      \vspace{0.45em}

      % Student section
      \FieldName{Graduating Student Name:}\\[0.7em]
      \FieldShort{CWID:}\hfill \FieldMed{Major(s):}\\[0.7em]

      % Pickup Authorization row (above signature)
      \YesNoRow{Pickup Authorization}\HSpace \textbf{|}\HSpace
      \textbf{Third-Party Name:}\HSpace\fillrule{\ThirdPartyRuleLen}\\[1.2em]

      % Signature row (last thing to fill) + tighter gap before divider
      \FieldSig{Student or Third-Party Signature:}\hfill \FieldDate{Date:}\\[0.6em]

      % Tight divider and tight header spacing
      \Divider{0.25em}{0.30em}
      \textbf{OFFICE USE ONLY:}\\[0.20em]

      % Office-use block
      \textbf{ID Checked by Staff:}\HSpace\fillrule{0.33\linewidth}\hfill
      \textbf{Date}\HSpace\fillrule{0.18\linewidth}\\[0.9em]

      % HOLDS
      \textbf{HOLDS:}\HSpace
      \BoxChoice\ \textbf{No}\HSpace\HSpace\HSpace
      \BoxChoice\ \textbf{Yes}\HSpace \textit{(List Depts)}\ \fillrule{0.42\linewidth}\\[0.9em]

      % Bottom stamp
      \vspace{0.1em}\RevStamp
    };
  \end{tikzpicture}\par
}{\vspace{0.08in}}

% Cut line
\newcommand{\CutLine}{%
  \vspace{0.02in}
  {\centering\color{black!35}\rule{0.995\linewidth}{0.4pt}\par}
  \vspace{0.02in}
}

\begin{document}
\small

\begin{DiplomaCard}\end{DiplomaCard}
\CutLine
\begin{DiplomaCard}\end{DiplomaCard}
\CutLine
\begin{DiplomaCard}\end{DiplomaCard}

\end{document}
