:root {
  --brand: #0f6e5b;
  --brand-dark: #0a4f41;
  --danger: #b3261e;
  --warn-bg: #fff4e5;
  --warn-border: #e8a33d;
  --bg: #f7f7f5;
  --card: #ffffff;
  --text: #1c1c1c;
  --muted: #6b6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 40px;
}

header.topbar {
  background: var(--brand);
  color: white;
  padding: 16px;
  text-align: center;
}
header.topbar h1 { font-size: 18px; margin: 0; }
header.topbar p { font-size: 12px; margin: 4px 0 0; opacity: 0.9; }

main { padding: 16px; }

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

input[type=text], input[type=tel], input[type=number], input[type=date], select {
  width: 100%;
  padding: 12px;
  font-size: 18px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 12px;
}

button.btn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  cursor: pointer;
}
button.btn:active { background: var(--brand-dark); }
button.btn.secondary { background: #e2e2e0; color: var(--text); }
button.btn:disabled { background: #ccc; cursor: not-allowed; }

.candidate-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.candidate-card img.photo {
  width: 72px; height: 72px; border-radius: 8px; object-fit: cover;
  background: #ddd;
}
.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.badge.available { background: #d9f2e6; color: var(--brand-dark); }
.badge.reserved { background: #fdecc8; color: #8a5a00; }
.badge.placed { background: #e0e0e0; color: #555; }

/* Small play-icon badge on catalog cards indicating a bio video exists --
   deliberately NOT an inline video/autoplay element (Team briefs/
   11-bio-video-feature.md: keep the catalog list view light). */
.badge.video-badge {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 110, 91, 0.92);
  color: white;
  font-size: 9px;
  padding: 1px 6px;
  white-space: nowrap;
}

.skills-row { font-size: 12px; color: var(--muted); margin-top: 4px; }

.disclaimer {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.4;
}
.disclaimer strong { display: block; margin-bottom: 4px; }

.dev-note {
  background: #eef3ff;
  border: 1px dashed #7a9fe0;
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  margin-bottom: 12px;
  color: #2a4a8a;
}

.error-msg { color: var(--danger); font-size: 14px; margin: 8px 0; }
.muted { color: var(--muted); font-size: 13px; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty-state svg { opacity: 0.45; margin-bottom: 12px; }
.empty-state .empty-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.empty-state .empty-hint { font-size: 13px; color: var(--muted); }
.empty-state .empty-hint a { color: var(--brand); font-weight: 600; }

/* Bulk-import result banner (Team briefs/cv-field-extraction.md item 5):
   a real successful import previously only got a plain <p> summary buried
   below the form, which pixkuwait's own live test read as "nothing
   happened" -- this is a can't-miss-it banner instead, colored by outcome
   so a batch with real problems doesn't LOOK identical to a clean one. */
.import-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
}
.import-banner .icon { font-size: 22px; line-height: 1; }
.import-banner.ok { background: #e7f5ee; border-color: var(--brand); color: var(--brand-dark); }
.import-banner.partial { background: var(--warn-bg); border-color: var(--warn-border); color: #7a4a00; }
.import-banner.none { background: #fdeceb; border-color: var(--danger); color: var(--danger); }

canvas#sigpad {
  border: 2px dashed #999;
  border-radius: 8px;
  width: 100%;
  touch-action: none;
  background: white;
}

img.contract-preview {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: zoom-in;
}

/* Tap-to-enlarge lightbox for the contract preview (2026-07-12, pixkuwait's
   request -- the scanned form is too small/dense to read at card width). */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  padding: 20px;
  box-sizing: border-box;
  overflow: auto;
  cursor: zoom-out;
}
.lightbox.open { display: flex; align-items: flex-start; justify-content: center; }
.lightbox img { width: 120%; max-width: 576px; border-radius: 4px; }

.field-row { margin-bottom: 10px; }
.field-row label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }

/* Civil ID step choice screen (Team briefs/2-civil-id-consent-and-retention.md):
   manual-entry vs upload/OCR presented as two equal-weight options. */
.choice-option button.btn { text-align: left; padding-left: 16px; }

/* --------------------------------------------------------------------------
   Staff admin pages (added 2026-07-02). The rest of this app is deliberately
   mobile-first/narrow (employers use phones, per the brief) -- the admin
   area is used by agency staff at a desk, so it gets a wider layout via this
   body class instead of the fixed 480px max-width above. */
body.admin { max-width: 900px; }

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.admin-table th, table.admin-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid #e6e6e3;
  vertical-align: middle;
}
table.admin-table th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; }
table.admin-table img.thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: #ddd; }
table.admin-table tr.inactive-row { opacity: 0.55; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row button.btn, .btn-row a.btn { width: auto; padding: 8px 14px; font-size: 13px; display: inline-block; text-decoration: none; }
.btn.small { padding: 6px 10px; font-size: 12px; width: auto; display: inline-block; }

/* CV button on the candidate detail page -- pixkuwait's explicit
   instruction: it needs to be much bigger than a normal button so no
   employer can miss it (2026-07-12). */
.btn.cv-highlight {
  padding: 26px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
}
.btn.danger { background: var(--danger); }
.btn.danger:active { background: #7e1a15; }

.admin-topbar { display: flex; justify-content: space-between; align-items: center; }
.admin-topbar a { color: white; font-size: 12px; opacity: 0.9; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .field-row.full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

.checkbox-row { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 14px; }
.checkbox-row input[type=checkbox] { width: auto; margin: 0; }

.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 12px; margin-bottom: 12px; }
@media (max-width: 480px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
