/* Rabbi IT Firm — staff verification
   One memorable thing: the result is a staff credential with security-print band and a stamp.
   Everything else stays quiet. */
:root{
  --ink:#0F2440;        /* navy, headings + credential band */
  --ink-2:#2A3F5F;
  --paper:#F5F7FA;      /* cool page background */
  --card:#FFFFFF;
  --line:#DCE3EC;
  --muted:#5F6B7E;
  --cobalt:#2450C8;     /* actions */
  --cobalt-d:#1A3C9E;
  --ok:#0E7A55; --ok-bg:#E2F3EB;
  --bad:#B42318; --bad-bg:#FCE9E7;
  --warn:#8A5A00; --warn-bg:#FFF3D6;
  --display:"Bricolage Grotesque",system-ui,sans-serif;
  --body:"Instrument Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.55 var(--body);font-feature-settings:"tnum" 1}
img{max-width:100%}
a{color:var(--cobalt)}
h1,h2,h3{font-family:var(--display);font-weight:700;line-height:1.15;margin:0;letter-spacing:-.01em}
:focus-visible{outline:3px solid #9DB6F2;outline-offset:2px;border-radius:6px}

/* ---------- controls ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;cursor:pointer;
  background:var(--cobalt);color:#fff;font:600 15px var(--body);padding:12px 20px;border-radius:10px;text-decoration:none;white-space:nowrap}
.btn:hover{background:var(--cobalt-d)}
.btn:disabled{opacity:.55;cursor:not-allowed}
.btn-quiet{background:transparent;color:var(--ink);box-shadow:inset 0 0 0 1px var(--line)}
.btn-quiet:hover{background:#EDF1F6}
.btn-sm{padding:8px 14px;font-size:14px}
input,select,textarea{width:100%;font:15px var(--body);color:var(--ink);background:#fff;border:1px solid #CBD4E1;border-radius:9px;padding:10px 12px}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--cobalt);box-shadow:0 0 0 3px rgba(36,80,200,.15)}
input[type=file]{padding:8px;background:var(--paper)}
.linkish{background:none;border:0;padding:0;font:inherit;color:var(--cobalt);cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.linkish.danger{color:var(--bad)}

.note{border-radius:10px;padding:12px 16px;margin:0 0 20px;font-weight:500}
.note-ok{background:var(--ok-bg);color:var(--ok)}
.note-err{background:var(--bad-bg);color:var(--bad)}
.note-warn{background:var(--warn-bg);color:var(--warn)}

.status{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;padding:3px 10px 3px 8px;border-radius:99px;white-space:nowrap}
.status::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.status-ok{background:var(--ok-bg);color:var(--ok)}
.status-bad{background:var(--bad-bg);color:var(--bad)}

/* ---------- public / auth shell ---------- */
.top{padding:22px 16px 0;max-width:1120px;margin:0 auto}
.top-logo img{height:44px;display:block}
.page{max-width:1120px;margin:0 auto;padding:32px 16px 48px}
.foot{max-width:1120px;margin:0 auto;padding:0 16px 32px;color:var(--muted);font-size:14px}

.verify{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:56px;align-items:start}
.verify-copy{padding-top:28px}
.verify-copy h1{font-size:clamp(32px,4.4vw,50px);max-width:13ch}
.verify-copy p{color:var(--muted);max-width:42ch;margin:16px 0 28px;font-size:17px}
.id-form label{display:block;font-weight:600;margin-bottom:8px}
.id-row{display:flex;gap:10px}
.id-row input{font-size:20px;font-weight:600;padding:14px 16px;letter-spacing:.02em}
.id-row .btn{padding:14px 24px;font-size:16px}
.hint{color:var(--muted);font-size:14px;margin-top:10px}

/* the credential */
.cred{background:var(--card);border-radius:18px;box-shadow:0 1px 0 var(--line),0 24px 48px -24px rgba(15,36,64,.35);overflow:hidden;position:relative}
.cred-band{height:132px;position:relative;color:#fff;padding:20px 24px;
  background:
    repeating-radial-gradient(circle at 8% 120%,transparent 0 10px,rgba(255,255,255,.09) 10px 11px),
    repeating-radial-gradient(circle at 104% -20%,transparent 0 14px,rgba(255,255,255,.07) 14px 15px),
    linear-gradient(120deg,var(--ink),#1B3A66)}
.cred.is-bad .cred-band{
  background:
    repeating-radial-gradient(circle at 8% 120%,transparent 0 10px,rgba(255,255,255,.08) 10px 11px),
    repeating-radial-gradient(circle at 104% -20%,transparent 0 14px,rgba(255,255,255,.06) 14px 15px),
    linear-gradient(120deg,#3A2A2E,#5A2F2C)}
.cred-band p{margin:0;font-size:14px;opacity:.85}
.cred-band strong{display:block;font-family:var(--display);font-size:19px;opacity:1}
.cred-photo{position:absolute;left:24px;top:72px;width:128px;height:156px;border-radius:12px;overflow:hidden;
  background:#E6ECF4;border:4px solid #fff;box-shadow:0 8px 20px -10px rgba(15,36,64,.5);display:grid;place-items:center;
  font:700 44px var(--display);color:var(--ink-2)}
.cred-photo img{width:100%;height:100%;object-fit:cover;display:block}
.cred.is-bad .cred-photo img{filter:grayscale(1) contrast(.95)}
.cred-head{padding:16px 24px 0 172px;min-height:110px}
.cred-head h2{font-size:28px}
.cred-head p{margin:4px 0 0;color:var(--muted)}
.cred-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:20px 0 0;border-top:1px solid var(--line)}
.cred-facts div{padding:14px 24px;border-bottom:1px solid var(--line)}
.cred-facts div:nth-child(odd){border-right:1px solid var(--line)}
.cred-facts div:last-child:nth-child(odd){grid-column:1/-1;border-right:0}
.cred-facts dt{font-size:13px;color:var(--muted)}
.cred-facts dd{margin:2px 0 0;font-weight:600;overflow-wrap:anywhere}
.cred-facts dd a{color:inherit;text-decoration-color:#B9C5D6;text-underline-offset:3px}
.cred-foot{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 24px;font-size:14px;color:var(--muted)}
.cred-foot img{height:26px;opacity:.9}

/* the stamp */
.stamp{position:absolute;right:24px;top:16px;width:118px;height:118px;border-radius:50%;
  display:grid;place-items:center;text-align:center;transform:rotate(-12deg);
  border:3px solid currentColor;box-shadow:inset 0 0 0 5px #fff,inset 0 0 0 7px currentColor;background:#fff;
  font:700 15px/1.1 var(--display);letter-spacing:.06em;animation:stamp .5s cubic-bezier(.2,.9,.3,1.3) .15s both}
.stamp small{display:block;font:600 10px var(--body);letter-spacing:.04em;margin-top:4px}
.stamp-ok{color:var(--ok)}
.stamp-bad{color:var(--bad)}
@keyframes stamp{from{opacity:0;transform:rotate(-12deg) scale(1.6)}to{opacity:1;transform:rotate(-12deg) scale(1)}}
@media (prefers-reduced-motion:reduce){.stamp{animation:none}}

.cred-empty{border:2px dashed #C6D0DE;border-radius:18px;min-height:380px;display:grid;place-items:center;text-align:center;padding:32px;color:var(--muted)}
.cred-empty .ghost{width:96px;height:118px;border-radius:12px;background:#E6ECF4;margin:0 auto 18px}
.cred-empty h2{font-size:20px;color:var(--ink-2);margin-bottom:6px}
.cred-empty p{margin:0 auto;max-width:34ch}

/* ---------- admin shell ---------- */
.shell{display:grid;grid-template-columns:248px minmax(0,1fr);min-height:100vh;background:linear-gradient(90deg,var(--ink) 248px,var(--paper) 248px)}
.side{background:var(--ink);color:#C9D4E5;padding:20px 14px;display:flex;flex-direction:column;gap:22px;position:sticky;top:0;height:100vh}
.side-logo{display:block;background:#fff;border-radius:10px;padding:10px 12px}
.side-logo img{height:34px;display:block}
.side-nav{display:flex;flex-direction:column;gap:2px}
.side-nav a,.side-foot a{color:#C9D4E5;text-decoration:none;padding:9px 12px;border-radius:8px;font-weight:500}
.side-nav a:hover,.side-foot a:hover{background:rgba(255,255,255,.07);color:#fff}
.side-nav a.on{background:#fff;color:var(--ink)}
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:2px;font-size:14px}
.main{padding:32px 36px 56px;max-width:1240px;width:100%}
.head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:24px}
.head h1{font-size:30px}
.head p{margin:6px 0 0;color:var(--muted)}
.head-actions{display:flex;gap:10px;flex-wrap:wrap}

.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.toolbar input{max-width:320px}
.toolbar select{width:auto}
.sheet{background:var(--card);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:15px}
th{text-align:left;font-weight:600;font-size:13px;color:var(--muted);background:#FAFBFD;padding:11px 14px;border-bottom:1px solid var(--line)}
td{padding:10px 14px;border-bottom:1px solid var(--line);vertical-align:middle}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover td{background:#FAFBFD}
.who{display:flex;align-items:center;gap:12px}
.who small{display:block;color:var(--muted)}
.face{width:40px;height:48px;border-radius:7px;overflow:hidden;background:#E6ECF4;display:grid;place-items:center;font-weight:700;color:var(--ink-2);flex-shrink:0}
.face img{width:100%;height:100%;object-fit:cover}
.code{font-weight:600}
.row-actions{display:flex;gap:14px;align-items:center;justify-content:flex-end;white-space:nowrap}
.row-actions form{margin:0}
.empty{padding:48px 24px;text-align:center;color:var(--muted)}
.empty h2{font-size:20px;color:var(--ink);margin-bottom:6px}

/* forms */
.box{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:28px}
.auth .page{display:grid;place-items:center;min-height:70vh}
.auth .box,.narrow{width:100%;max-width:420px}
.box h1{font-size:26px;margin-bottom:6px}
.box > p{color:var(--muted);margin:0 0 20px}
.form{display:flex;flex-direction:column;gap:16px}
.form label{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:14px}
.form label small{font-weight:400;color:var(--muted)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px 20px}
.full{grid-column:1/-1}
.photo-pick{display:flex;gap:20px;align-items:center}
.photo-pick .face{width:112px;height:136px;border-radius:12px;font-size:14px;font-weight:500;color:var(--muted)}
.check{flex-direction:row!important;align-items:center;gap:8px!important;font-weight:500!important}
.check input{width:auto}

/* ---------- import ---------- */
.drop{display:block;border:2px dashed #B9C5D6;border-radius:14px;background:var(--card);padding:40px 24px;text-align:center;cursor:pointer}
.drop:hover,.drop.over{border-color:var(--cobalt);background:#F3F6FD}
.drop strong{display:block;font-family:var(--display);font-size:20px;margin-bottom:4px}
.drop span{color:var(--muted)}
.drop input{position:absolute;width:1px;height:1px;opacity:0}
.imp-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;
  background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px 18px;margin:20px 0 16px;position:sticky;top:12px;z-index:3}
.imp-bar .opts{display:flex;gap:18px;align-items:center;flex-wrap:wrap;font-size:14px}
.imp-bar select{width:auto;padding:7px 10px}
.progress{height:6px;background:#E6ECF4;border-radius:99px;overflow:hidden;margin:0 0 16px}
.progress i{display:block;height:100%;width:0;background:var(--cobalt);transition:width .2s}
.cards{display:flex;flex-direction:column;gap:14px}
.card-row{display:grid;grid-template-columns:28px 150px 120px minmax(0,1fr);gap:18px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px}
.card-row.off{opacity:.5}
.card-row.done{border-color:#9FD5BE;background:#F7FCF9}
.card-row.fail{border-color:#F0B4AD}
.card-row .pick{padding-top:4px}
.card-row .pick input{width:18px;height:18px}
.pagethumb{width:150px;border-radius:8px;border:1px solid var(--line);display:block;background:#fff}
.pagelabel{font-size:13px;color:var(--muted);margin-top:6px}
.photo-cell .face{width:120px;height:146px;border-radius:10px;font-size:13px;font-weight:500;color:var(--muted);text-align:center;padding:8px}
.photo-cell label{display:block;margin-top:8px;font-size:13px}
.photo-cell input{position:absolute;width:1px;height:1px;opacity:0}
.fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 12px}
.fields label{display:flex;flex-direction:column;gap:4px;font-size:12.5px;font-weight:600;color:var(--muted)}
.fields input,.fields select{padding:8px 10px;font-size:14px}
.fields input.missing{border-color:#E7A39B;background:#FFF8F7}
.row-msg{grid-column:1/-1;font-size:14px;font-weight:500;margin:0}
.row-msg:empty{display:none}
.row-msg.ok{color:var(--ok)}.row-msg.err{color:var(--bad)}
details.raw{grid-column:1/-1;font-size:13px;color:var(--muted)}
details.raw pre{white-space:pre-wrap;background:var(--paper);padding:10px;border-radius:8px;margin:6px 0 0;max-height:160px;overflow:auto}

/* ---------- responsive ---------- */
@media (max-width:980px){
  .verify{grid-template-columns:1fr;gap:32px}
  .verify-copy{padding-top:0}
  .card-row{grid-template-columns:28px 120px minmax(0,1fr)}
  .card-row .page-cell{display:none}
  .fields{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:820px){
  .shell{grid-template-columns:1fr;background:var(--paper)}
  .side{position:static;height:auto;flex-direction:row;flex-wrap:wrap;align-items:center;gap:10px;padding:12px}
  .side-logo{padding:6px 8px}.side-logo img{height:28px}
  .side-nav{flex-direction:row;flex-wrap:wrap}
  .side-foot{margin:0;flex-direction:row}
  .main{padding:24px 16px 48px}
}
@media (max-width:560px){
  .id-row{flex-direction:column}
  .cred-band{height:150px;padding:18px 20px}
  .cred-photo{position:relative;left:auto;top:auto;margin:-58px auto 0;width:118px;height:144px}
  .cred-head{padding:14px 20px 0;text-align:center;min-height:0}
  .stamp{top:14px;right:14px;width:84px;height:84px;font-size:11px}
  .stamp small{font-size:8px}
  .cred-facts{grid-template-columns:1fr}
  .cred-facts div:nth-child(odd){border-right:0}
  .grid2,.fields{grid-template-columns:1fr}
  .photo-pick{flex-direction:column;align-items:flex-start}
  .card-row{grid-template-columns:24px minmax(0,1fr)}
  .card-row .photo-cell{grid-column:2}
  .card-row .fields{grid-column:1/-1}
}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
