/* ═══════════════════════════════════════════════════════════════════
   OWLMARK HALL PASS STUDIO
   Cards sized in millimetres and tiled on a real sheet, so what comes
   out of the printer can be cut and laminated without measuring. Colour
   carries the meaning: each pass owns one, and it runs through the
   banner, the symbol and the rule at the foot.
   ═══════════════════════════════════════════════════════════════════ */

:root{
  --hp-page-w:210mm; --hp-page-h:297mm;
  --hp-w:100mm; --hp-h:70mm; --hp-cols:2;
  --hp-mx:5mm; --hp-my:8.5mm; --hp-gx:0mm; --hp-gy:0mm;
  --pass:#0F766E; --pass-deep:#0B3B37;
}

#printable{
  background:none;box-shadow:none;border-radius:0;
  display:flex;flex-direction:column;gap:24px;align-items:center;
  width:auto;max-width:none;
}

.hp-page{
  position:relative;
  width:var(--hp-page-w);height:var(--hp-page-h);
  background:#fff;
  box-shadow:0 24px 64px rgba(16,26,45,.3),0 0 0 1px rgba(201,154,61,.16);
  overflow:hidden;
}
.hp-sheet{
  padding:var(--hp-my) var(--hp-mx);
  display:grid;
  grid-template-columns:repeat(var(--hp-cols),var(--hp-w));
  grid-auto-rows:var(--hp-h);
  column-gap:var(--hp-gx);row-gap:var(--hp-gy);
  justify-content:center;align-content:start;
}
.hp-sheet.marks .hp-card{outline:.3mm dashed rgba(16,26,45,.28);outline-offset:0}

/* ── The card ───────────────────────────────────────────────────── */
.hp-card{
  position:relative;overflow:hidden;
  display:flex;flex-direction:column;
  padding:4mm 5mm 3.4mm;
  background:#FFFDF8;color:#1B2233;
  font-family:'Lato','Manrope',sans-serif;
  border:.4mm solid rgba(16,26,45,.18);
}
body.lang-ar .hp-card{font-family:'Cairo',sans-serif}

.hp-head{display:flex;align-items:center;gap:3mm;padding-bottom:2mm}
.hp-logo{height:9mm;width:auto;max-width:20mm;object-fit:contain}
.hp-head-text{flex:1;min-width:0}
.hp-school{
  font-size:8pt;font-weight:800;line-height:1.1;color:var(--pass-deep);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.hp-kicker{
  font-size:6pt;font-weight:800;letter-spacing:.22em;text-transform:uppercase;
  color:rgba(27,34,51,.5);margin-top:.6mm;
}
body.lang-ar .hp-kicker{letter-spacing:.02em;font-size:7pt}
.hp-icon{
  width:11mm;height:11mm;flex:0 0 auto;display:grid;place-items:center;
  border-radius:2.4mm;color:#fff;background:var(--pass);
}
.hp-icon svg{width:7mm;height:7mm}

.hp-title{display:flex;flex-direction:column;gap:.4mm;padding:1mm 0 2mm}
.hp-title strong{
  font-family:'Cormorant Garamond',serif;
  font-size:20pt;line-height:1;font-weight:700;color:var(--pass-deep);
}
body.lang-ar .hp-title strong{font-family:'Cairo',sans-serif;font-size:17pt}
.hp-title span{
  font-size:9pt;font-weight:700;color:var(--pass);opacity:.9;
}

/* write-on lines */
.hp-fields{
  flex:1;display:grid;grid-template-columns:repeat(3,1fr);gap:1.6mm 3mm;align-content:end;
}
.hp-field{display:flex;flex-direction:column;gap:.6mm;min-width:0}
.hp-field.wide{grid-column:span 3}
.hp-field span{
  font-size:6pt;font-weight:800;letter-spacing:.08em;text-transform:uppercase;
  color:rgba(27,34,51,.55);
}
body.lang-ar .hp-field span{letter-spacing:0;text-transform:none;font-size:7pt}
.hp-field i{display:block;height:4.6mm;border-bottom:.25mm dotted rgba(27,34,51,.6)}

/* laminated: no lines, just the standing detail */
.hp-standing{flex:1;display:flex;flex-direction:column;justify-content:flex-end;gap:.6mm}
.hp-standing-name{font-size:11pt;font-weight:800;color:var(--pass-deep)}
.hp-standing-room{font-size:8.4pt;opacity:.7}

.hp-foot{
  display:flex;align-items:center;justify-content:space-between;gap:3mm;
  margin-top:2mm;padding-top:1.6mm;border-top:.25mm solid rgba(27,34,51,.16);
}
.hp-rule{font-size:6.4pt;font-weight:700;color:var(--pass);opacity:.9;line-height:1.25}
body.lang-ar .hp-rule{font-size:7pt}
.hp-mark{
  display:flex;align-items:center;gap:1.2mm;flex:0 0 auto;
  font-size:5.4pt;font-weight:800;letter-spacing:.14em;text-transform:uppercase;
  color:rgba(27,34,51,.38);
}
body.lang-ar .hp-mark{letter-spacing:.02em}
.hp-mark img{width:3.2mm;height:3.2mm;object-fit:contain;opacity:.6}

/* ── Four card treatments ───────────────────────────────────────── */
.hp-banner::before{
  content:"";position:absolute;top:0;left:0;right:0;height:2.4mm;background:var(--pass);
}
.hp-banner{padding-top:5.4mm}

.hp-block .hp-head{
  margin:-4mm -5mm 2mm;padding:3mm 5mm;
  background:var(--pass-deep);
}
.hp-block .hp-school{color:#fff}
.hp-block .hp-kicker{color:rgba(255,255,255,.65)}
.hp-block .hp-icon{background:rgba(255,255,255,.16);box-shadow:inset 0 0 0 .3mm rgba(255,255,255,.4)}

.hp-edge{padding-inline-start:9mm}
.hp-edge::before{
  content:"";position:absolute;top:0;bottom:0;inset-inline-start:0;width:5mm;
  background:linear-gradient(180deg,var(--pass),var(--pass-deep));
}

.hp-framed{border:none;padding:5mm 6mm 4mm}
.hp-framed::before{
  content:"";position:absolute;inset:1.6mm;border:.5mm solid var(--pass);border-radius:1.6mm;
  pointer-events:none;
}
.hp-framed::after{
  content:"";position:absolute;inset:2.8mm;border:.2mm solid rgba(27,34,51,.22);border-radius:1mm;
  pointer-events:none;
}

.hp-card.laminate .hp-title strong{font-size:24pt}
body.lang-ar .hp-card.laminate .hp-title strong{font-size:20pt}

/* ── Sign-out log ───────────────────────────────────────────────── */
.hp-log{padding:14mm 14mm 12mm;display:flex;flex-direction:column;font-family:'Lato',sans-serif;color:#1B2233}
body.lang-ar .hp-log{font-family:'Cairo',sans-serif}
.hp-log-head{
  display:flex;align-items:center;justify-content:space-between;gap:8mm;
  padding-bottom:3mm;margin-bottom:4mm;border-bottom:.7mm solid #101A2D;
}
.hp-log-head h1{font-family:'Cormorant Garamond',serif;font-size:19pt;font-weight:700;color:#101A2D}
body.lang-ar .hp-log-head h1{font-family:'Cairo',sans-serif;font-size:16pt}
.hp-log-head p{font-size:8.6pt;opacity:.7;margin-top:1mm}
.hp-log-head img{width:14mm;height:14mm;object-fit:contain;opacity:.85}
.hp-log-table{width:100%;border-collapse:collapse;table-layout:fixed;flex:1}
.hp-log-table th,.hp-log-table td{border:.3mm solid rgba(16,26,45,.4);padding:1.6mm 2mm;font-size:9pt}
.hp-log-table thead th{
  background:#101A2D;color:#fff;font-size:8pt;font-weight:800;
  letter-spacing:.05em;text-transform:uppercase;text-align:center;
}
body.lang-ar .hp-log-table thead th{letter-spacing:0;text-transform:none}
.hp-log-table .c-no{width:10mm;text-align:center}
.hp-log-table .c-time{width:20mm}
.hp-log-table .c-init{width:20mm}
.hp-log-table .c-dest{width:34mm}
.hp-log-table tbody td{height:8.2mm}
.hp-log-table tbody tr:nth-child(even) td{background:rgba(16,26,45,.03)}
.hp-log-foot{
  display:flex;align-items:center;justify-content:space-between;gap:6mm;
  margin-top:4mm;padding-top:2mm;border-top:.25mm solid rgba(16,26,45,.15);
  font-size:7.4pt;color:rgba(27,34,51,.55);
}

/* ── Empty state ────────────────────────────────────────────────── */
.hp-empty{display:flex;align-items:center;justify-content:center}
.hp-empty-body{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;color:var(--ok-text-soft,#5B647A)}
.hp-empty-body img{width:54px;height:54px;opacity:.5}
.hp-empty-body strong{font-family:'Cormorant Garamond',serif;font-size:1.35rem;color:var(--ok-navy,#101A2D)}

/* ── Panel ──────────────────────────────────────────────────────── */
.pass-list{display:flex;flex-direction:column;gap:7px}
.pass-row{
  display:flex;align-items:center;gap:10px;
  padding:8px 11px;border-radius:12px;
  border:1.5px solid var(--ok-border,#DDD5C6);background:var(--ok-ivory,#FAF7EF);
  transition:.15s;
}
.pass-row.on{border-color:var(--pass);background:color-mix(in srgb, var(--pass) 8%, #fff)}
.pass-pick{display:flex;align-items:center;gap:9px;flex:1;min-width:0;cursor:pointer}
.pass-pick input{width:16px;height:16px;accent-color:var(--pass);flex:0 0 auto}
.pass-ic{
  width:28px;height:28px;flex:0 0 auto;border-radius:8px;display:grid;place-items:center;
  background:var(--pass);color:#fff;
}
.pass-ic svg{width:16px;height:16px}
.pass-name{font-size:.82rem;font-weight:800;color:var(--ok-navy,#101A2D)}
.pass-copies{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.pass-copies b{min-width:18px;text-align:center;font-size:.82rem;font-weight:800;color:var(--ok-navy,#101A2D)}
.count-btn.sm{width:26px;height:26px;font-size:.9rem}

.size-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.size-card{
  display:flex;flex-direction:column;align-items:center;gap:5px;
  padding:10px 8px;border-radius:12px;cursor:pointer;font-family:inherit;
  border:1.5px solid var(--ok-border,#DDD5C6);background:var(--ok-ivory,#FAF7EF);transition:.15s;
}
.size-card:hover{border-color:var(--ok-gold,#C99A3D);transform:translateY(-1px)}
.size-card.active{border-color:var(--ok-gold,#C99A3D);background:rgba(201,154,61,.1);box-shadow:inset 0 0 0 1px var(--ok-gold,#C99A3D)}
.sz-mini{width:44px;border:1.5px solid var(--ok-slate,#64748B);border-radius:2px;opacity:.55;display:block}
.size-card.active .sz-mini{border-color:var(--ok-gold,#C99A3D);opacity:1}
.sz-name{font-size:.74rem;font-weight:800;color:var(--ok-navy,#101A2D)}
.sz-dims{font-size:.62rem;color:var(--ok-text-soft,#5B647A)}

.style-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}
.style-card{
  display:flex;flex-direction:column;align-items:center;gap:5px;
  padding:8px 5px;border-radius:11px;cursor:pointer;font-family:inherit;
  border:1.5px solid var(--ok-border,#DDD5C6);background:#fff;transition:.15s;
}
.style-card:hover{border-color:var(--ok-gold,#C99A3D)}
.style-card.active{border-color:var(--ok-gold,#C99A3D);background:rgba(201,154,61,.1)}
.st-mini{
  width:100%;height:24px;border-radius:3px;background:var(--ok-ivory,#FAF7EF);
  border:1px solid var(--ok-border,#DDD5C6);position:relative;overflow:hidden;
}
.st-banner::before{content:"";position:absolute;top:0;left:0;right:0;height:5px;background:#0F766E}
.st-block::before{content:"";position:absolute;top:0;left:0;right:0;height:11px;background:#0F766E}
.st-edge::before{content:"";position:absolute;top:0;bottom:0;left:0;width:6px;background:#0F766E}
.st-framed::before{content:"";position:absolute;inset:3px;border:1.5px solid #0F766E;border-radius:2px}
.st-name{font-size:.58rem;font-weight:800;letter-spacing:.02em;text-transform:uppercase;color:var(--ok-text-soft,#5B647A);text-align:center;line-height:1.2}
.style-card.active .st-name{color:var(--ok-gold,#C99A3D)}

/* ── Print ──────────────────────────────────────────────────────── */
@media print{
  #printable{gap:0 !important;display:block !important;transform:none !important}
  .hp-page{
    box-shadow:none !important;
    width:var(--hp-page-w) !important;height:var(--hp-page-h) !important;
    break-after:page;page-break-after:always;margin:0 !important;
  }
  .hp-page:last-child{break-after:auto;page-break-after:auto}
  .hp-empty{display:none !important}
  .hp-card,.hp-icon,.hp-banner::before,.hp-edge::before,.hp-block .hp-head,
  .hp-log-table thead th,.hp-log-table tbody tr:nth-child(even) td{
    -webkit-print-color-adjust:exact !important;print-color-adjust:exact !important;
  }
  .hp-card,tr,td,th{break-inside:avoid !important;page-break-inside:avoid !important}
}

/* ── Your own symbol on a pass ─────────────────────────────────────── */
.hp-icon.custom{background:transparent;box-shadow:inset 0 0 0 .3mm var(--pass)}
.hp-icon.custom img{width:8.4mm;height:8.4mm;object-fit:contain}
.pass-ic.custom{background:#fff;box-shadow:inset 0 0 0 1.5px var(--pass)}
.pass-ic.custom img{width:20px;height:20px;object-fit:contain}

.symbol-row{
  display:flex;align-items:center;gap:10px;
  padding:7px 10px;border-radius:11px;margin-bottom:6px;
  border:1px solid var(--ok-border,#DDD5C6);background:var(--ok-ivory,#FAF7EF);
}
.symbol-name{flex:1;min-width:0;font-size:.78rem;font-weight:700;color:var(--ok-navy,#101A2D)}
.symbol-acts{display:flex;gap:6px;flex:0 0 auto}

/* ═══════════════ CARD NUMBER ═══════════════
   Small, in a corner, and printed — a number that only exists on screen
   would be no use at all once the cards are cut and in a drawer. It sits
   on the card's own colour, so it takes the ink that colour already
   carries rather than introducing a new one. */
.hp-cardno{
  position:absolute;top:2mm;inset-inline-end:2.6mm;
  z-index:3;
  font-family:'Manrope',system-ui,sans-serif;
  font-size:6.5pt;font-weight:800;letter-spacing:.04em;
  color:rgba(255,255,255,.82);
  opacity:.9;
}
.hp-card{position:relative}
/* On a pale laminate card the number needs the darker ink instead. */
.hp-card.laminate .hp-cardno{color:rgba(16,26,45,.5)}

/* ═══════════════ DOUBLE-SIDED PASSES ═══════════════
   The back is the rules side. A spacer keeps the mirrored grid
   positions honest when the last row is not full — without it the
   final card's back slides one column over and every card on that row
   cuts apart mismatched. */
.hp-back{
  display:flex;flex-direction:column;
  padding:3mm 3.4mm;
  border:.3mm solid var(--hp-ink,#101A2D);
  border-radius:2mm;
  background:#FDFBF6;
  overflow:hidden;
}
.hp-back-title{
  font-size:7.6pt;font-weight:800;letter-spacing:.05em;
  color:var(--hp-ink,#101A2D);
  padding-bottom:1.4mm;margin-bottom:1.8mm;
  border-bottom:.25mm solid rgba(16,26,45,.28);
  text-transform:uppercase;
}
body.lang-ar .hp-back-title{letter-spacing:0;text-transform:none}
.hp-back-rules{
  flex:1 1 auto;min-height:0;
  margin:0;padding-inline-start:4mm;
  font-size:6.9pt;line-height:1.5;color:#2A3247;
}
.hp-back-rules li{margin-bottom:.8mm}
.hp-back-blank{display:flex;flex-direction:column;gap:2.6mm;justify-content:center;padding:0}
.hp-back-blank i{display:block;height:0;border-bottom:.25mm solid rgba(16,26,45,.3)}
.hp-back-foot{
  margin-top:1.4mm;padding-top:1.2mm;
  border-top:.25mm solid rgba(16,26,45,.18);
  font-size:6.4pt;font-weight:700;color:#5A6478;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.hp-spacer{border:none;background:transparent}
.hp-backsheet.marks .hp-spacer{outline:none}
@media print{
  .hp-back{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
