/* ===========================================================
   PayStubPro — style.css
   Light, clean, corporate design system
   =========================================================== */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; }
button { cursor: pointer; font-family: inherit; }

/* ── Design Tokens ── */
:root {
  --blue-50:   #eff6ff;
  --blue-100:  #dbeafe;
  --blue-200:  #bfdbfe;
  --blue-300:  #93c5fd;
  --blue-400:  #60a5fa;
  --blue-500:  #3b82f6;
  --blue-600:  #2563eb;
  --blue-700:  #1d4ed8;

  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-300:  #d1d5db;
  --gray-400:  #9ca3af;
  --gray-500:  #6b7280;
  --gray-600:  #4b5563;
  --gray-700:  #374151;
  --gray-800:  #1f2937;
  --gray-900:  #111827;

  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-700: #15803d;

  --amber-50:  #fffbeb;
  --amber-100: #fef3c7;
  --amber-600: #d97706;

  --danger:    #ef4444;

  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --topbar-h:  58px;
  --form-w:    390px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.09);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
}

/* ── Base ── */
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--gray-800);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ══════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════ */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  padding: 0 24px;
  flex-shrink: 0;
  z-index: 200;
}
.topbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gray-900);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.brand strong { color: var(--blue-600); font-weight: 700; }
.brand-logo {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 6px rgba(37,99,235,0.35);
  flex-shrink: 0;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-badge { font-size: 0.73rem; color: var(--gray-400); font-weight: 400; }

/* Primary button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: var(--blue-600);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(37,99,235,0.35);
}
.btn-primary:hover:not(:disabled) {
  background: var(--blue-700);
  box-shadow: 0 4px 14px rgba(37,99,235,0.45);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* ══════════════════════════════════════════
   APP LAYOUT
══════════════════════════════════════════ */
.app-layout { display: flex; flex: 1; overflow: hidden; }

/* ══════════════════════════════════════════
   FORM PANEL
══════════════════════════════════════════ */
.form-panel {
  width: var(--form-w);
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.form-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}
.form-scroll::-webkit-scrollbar { width: 4px; }
.form-scroll::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

/* Form section card */
.form-section {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-section:last-child { margin-bottom: 0; }
.form-section:focus-within {
  border-color: var(--blue-300);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-200);
}
.section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--blue-600);
  color: #fff;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.section-title { font-size: 0.81rem; font-weight: 600; color: var(--gray-700); }

/* Form fields */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.form-group:last-child { margin-bottom: 0; }
.form-group label { font-size: 0.71rem; font-weight: 500; color: var(--gray-600); }
.req { color: var(--danger); margin-left: 1px; }

.form-group input,
.form-group select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.82rem;
  color: var(--gray-800);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.form-group input::placeholder { color: var(--gray-400); font-size: 0.8rem; }
.form-group input[type="date"] { color: var(--gray-700); }

.form-row { display: flex; gap: 8px; }
.form-row .form-group { flex: 1; margin-bottom: 0; }
.fg-1 { flex: 1 !important; }
.fg-2 { flex: 2 !important; }

/* Calc breakdown box */
.calc-box {
  margin-top: 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}
.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 12px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.73rem;
}
.calc-row:last-child { border-bottom: none; }
.calc-row span:first-child { color: var(--gray-600); }
.calc-row span:last-child {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--gray-800);
}
.calc-row.calc-total { background: var(--gray-50); }
.calc-row.calc-total span { color: var(--gray-900) !important; font-weight: 700; }
.calc-row.calc-net { background: var(--blue-600) !important; border-bottom: none; }
.calc-row.calc-net span { color: #fff !important; font-weight: 700; }

/* Period badge */
.period-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--blue-700);
  white-space: nowrap;
  min-height: 30px;
}

/* YTD Summary Card */
.ytd-summary {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}
.ytd-pending {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 12px;
  font-size: 0.73rem;
  color: var(--gray-400);
  font-style: italic;
}
.ytd-pending svg { flex-shrink: 0; color: var(--gray-300); }

/* YTD loaded state */
.ytd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: var(--green-50);
  border-bottom: 1px solid var(--green-100);
}
.ytd-header-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--green-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ytd-header-meta { font-size: 0.68rem; color: var(--green-700); opacity: 0.75; }

.ytd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 12px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.73rem;
}
.ytd-row:last-child { border-bottom: none; }
.ytd-row span:first-child { color: var(--gray-600); }
.ytd-row span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--gray-800); }
.ytd-row.ytd-total { background: var(--gray-50); }
.ytd-row.ytd-total span { color: var(--gray-900) !important; font-weight: 700; }

.ytd-footer {
  padding: 6px 12px;
  background: var(--amber-50);
  border-top: 1px solid var(--amber-100);
  font-size: 0.68rem;
  color: var(--amber-600);
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════
   PREVIEW PANEL
══════════════════════════════════════════ */
.preview-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--gray-100);
}
.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  flex-shrink: 0;
}
.preview-bar-left { display: flex; align-items: center; gap: 7px; }
.preview-label { font-size: 0.78rem; font-weight: 600; color: var(--gray-700); }
.preview-hint { font-size: 0.7rem; color: var(--gray-400); }
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green-500);
  animation: blink 2s ease infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.preview-scroll {
  flex: 1;
  overflow: auto;
  display: flex;
  justify-content: center;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}
.preview-scroll::-webkit-scrollbar { width: 6px; }
.preview-scroll::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

.preview-stage {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 3px;
  box-shadow: var(--shadow-lg);
  width: 816px;
  min-height: 200px;
  flex-shrink: 0;
  overflow: hidden;
  align-self: flex-start;
  position: relative;
}

/* ══════════════════════════════════════════
   PAYSTUB — Black & White Print Style
   (No CSS variables — html2canvas compatible)
══════════════════════════════════════════ */
.paystub {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 8.5px;
  color: #000;
  background: #fff;
  padding: 16px 20px;
  line-height: 1.3;
  min-height: 200px;
}

/* Company header */
.ps-header {
  text-align: center;
  padding-bottom: 5px;
  margin-bottom: 0;
  border-bottom: 1.5px solid #333;
}
.ps-co-name {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ps-co-addr { font-size: 8px; color: #444; }

/* Paystub tables */
.ps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8px;
}
.ps-table th,
.ps-table td {
  border: 1px solid #999;
  padding: 2px 5px;
  vertical-align: middle;
  text-align: left;
  white-space: nowrap;
}
.ps-table th {
  background: #ddd;
  font-weight: 700;
  font-size: 7.5px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.ps-table .t-num { text-align: right; font-variant-numeric: tabular-nums; }
.ps-table .t-bold { font-weight: 700; }
.ps-table .t-center { text-align: center; }
.ps-table .t-sub { border-top: none; }
.ps-table .bg-section {
  background: #ccc;
  font-weight: 700;
  font-size: 8px;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.04em;
}
.ps-table .bg-total { background: #ececec; }

/* Placeholder */
.ps-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  gap: 12px;
  text-align: center;
  font-family: 'Inter', system-ui, sans-serif;
  color: #9ca3af;
}
.ps-placeholder svg { opacity: 0.25; }
.ps-placeholder p { font-size: 0.9rem; }
.ps-placeholder small { font-size: 0.74rem; color: #d1d5db; }

/* ══════════════════════════════════════════
   PDF OVERLAY
══════════════════════════════════════════ */
.pdf-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(4px);
}
.pdf-overlay.hidden { display: none; }
.overlay-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.overlay-card p { font-size: 0.9rem; color: var(--gray-700); font-weight: 500; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--blue-100);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════
   USER NAV (topbar — shown when signed in)
══════════════════════════════════════════════════════════ */
.user-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.user-nav.hidden { display: none !important; }

.user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--blue-600);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-email {
  font-size: 0.76rem;
  color: var(--gray-600);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-pro-badge {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}
.user-pro-badge.hidden { display: none !important; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }
.btn-signout { color: var(--gray-400); }
.btn-signout:hover { background: #fef2f2; color: var(--danger); border-color: #fecaca; }

/* ══════════════════════════════════════════════════════════
   MODAL — shared overlay + card base
══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 998;
  backdrop-filter: blur(6px);
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none !important; }

.modal-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.2);
  position: relative;
  width: 100%;
  animation: slideUp 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 28px; height: 28px;
  background: var(--gray-100);
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--gray-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--gray-200); color: var(--gray-800); }

/* ══════════════════════════════════════════════════════════
   AUTH MODAL
══════════════════════════════════════════════════════════ */
.auth-card {
  max-width: 380px;
  padding: 28px 28px 24px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.auth-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}
.auth-subtitle {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* Google button */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}
.btn-google:hover { background: var(--gray-50); box-shadow: var(--shadow-md); }
.btn-google img { flex-shrink: 0; }
.btn-google:disabled { opacity: 0.6; cursor: not-allowed; }

/* Auth spinner (inline) */
.auth-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--gray-300);
  border-top-color: var(--gray-600);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--gray-300);
  font-size: 0.72rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1;
  border-top: 1px solid var(--gray-200);
}

/* Tabs */
.auth-tabs {
  display: flex;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 14px;
}
.auth-tab {
  flex: 1;
  padding: 7px;
  border: none;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.auth-tab.tab-active { background: var(--blue-600); color: #fff; font-weight: 600; }

/* Email form */
.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-form input {
  padding: 8px 11px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.84rem;
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-form input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.auth-error {
  font-size: 0.74rem;
  color: var(--danger);
  min-height: 16px;
}
.btn-auth-submit {
  width: 100%;
  padding: 9px;
  background: var(--blue-600);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 2px;
}
.btn-auth-submit:hover:not(:disabled) { background: var(--blue-700); }
.btn-auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════
   PRICING MODAL
══════════════════════════════════════════════════════════ */
.pricing-card {
  max-width: 560px;
  padding: 28px;
}
.pricing-header { text-align: center; margin-bottom: 22px; }
.pricing-header h2 { font-size: 1.3rem; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.pricing-header p  { font-size: 0.82rem; color: var(--gray-500); }

.pricing-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.plan-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow 0.2s;
}
.plan-card:hover { box-shadow: var(--shadow-md); }

.plan-featured {
  border-color: var(--blue-300);
  background: var(--blue-50);
  box-shadow: 0 0 0 2px var(--blue-200);
}

.plan-featured-tag {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  background: var(--blue-600);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan-type   { font-size: 0.7rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.plan-price  { font-size: 2rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.plan-period { font-size: 0.72rem; color: var(--gray-400); margin-bottom: 14px; }

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
  flex: 1;
}
.plan-features li { font-size: 0.77rem; color: var(--gray-700); display: flex; gap: 6px; align-items: flex-start; }
.check { color: var(--green-500); font-weight: 700; flex-shrink: 0; }

.btn-plan {
  width: 100%;
  padding: 9px;
  background: var(--gray-800);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-plan:hover:not(:disabled) { background: var(--gray-900); transform: translateY(-1px); }
.btn-plan:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-plan-featured {
  background: var(--blue-600);
  box-shadow: 0 2px 8px rgba(37,99,235,0.35);
}
.btn-plan-featured:hover:not(:disabled) { background: var(--blue-700); }

.pricing-error {
  text-align: center;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--danger);
}
.pricing-error.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════
   MY STUBS MODAL
══════════════════════════════════════════════════════════ */
.stubs-card { max-width: 480px; padding: 24px 24px 20px; }
.stubs-title    { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.stubs-subtitle { font-size: 0.78rem; color: var(--gray-500); margin-bottom: 16px; }

.stubs-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.stubs-loading { font-size: 0.82rem; color: var(--gray-400); padding: 20px 0; text-align: center; }
.stubs-empty   { font-size: 0.82rem; color: var(--gray-400); padding: 20px 0; text-align: center; }

.stub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  gap: 12px;
}
.stub-item-name { font-size: 0.82rem; font-weight: 600; color: var(--gray-800); }
.stub-item-meta { font-size: 0.72rem; color: var(--gray-400); margin-top: 1px; }

.btn-load-stub {
  padding: 5px 12px;
  background: var(--blue-600);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-load-stub:hover { background: var(--blue-700); }

/* ══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
══════════════════════════════════════════════════════════ */
#app-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gray-900);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
#app-toast.toast-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
#app-toast.toast-success { background: var(--green-700); }
#app-toast.toast-error   { background: var(--danger); }
#app-toast.toast-info    { background: var(--gray-700); }


/* ══════════════════════════════════════════════════════════
   IN-DOM PAYSTUB WATERMARK (Inside #paystub element)
══════════════════════════════════════════════════════════ */
.paystub {
  position: relative;
}

.ps-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 64px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: rgba(220, 38, 38, 0.15);
  transform: rotate(-32deg);
  pointer-events: none;
  user-select: none;
  z-index: 100;
  white-space: nowrap;
}


/* ══════════════════════════════════════════════════════════
   PRINT PROTECTION (@media print block)
══════════════════════════════════════════════════════════ */
@media print {
  body * {
    display: none !important;
  }
  body::before {
    content: "Paystubber — Official PDF Download Required\A\A Direct browser printing is disabled. Please click 'Download PDF' on paystubber.com to generate your clean paystub.";
    white-space: pre-wrap;
    display: block !important;
    padding: 60px;
    font-family: sans-serif;
    font-size: 18px;
    text-align: center;
    color: #333;
    line-height: 1.6;
  }
}


