/* ==============================================================
   CR80 Standard Card Dimensions & Print Precision CSS
   CR80 Specs: 85.6mm x 54mm (Radius: ~3.18mm)
   High DPI screen simulation: 320px x 506px (Portrait) / 506px x 320px (Landscape)
   ============================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Tajawal:wght@400;500;700;800&family=IBM+Plex+Sans+Arabic:wght@400;600;700&display=swap');

:root {
  --gold-primary: #c4915a;
  --gold-gradient: linear-gradient(135deg, #e8cca5 0%, #c4915a 50%, #945826 100%);
  --gold-border: #b88247;
  --gold-light: #fdfaf6;
  --gold-dark: #7a4317;
  --dark-slate: #201a15;
  --charcoal: #14100d;
}

/* Card Root Container */
.id-card-wrapper {
  perspective: 1000px;
  display: inline-flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Card Base Dimensions */
.cr80-card {
  position: relative;
  width: 324px;
  height: 512px;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 18px;
  font-family: 'Cairo', 'Tajawal', sans-serif;
  user-select: none;
  box-shadow: 0 12px 30px -8px rgba(32, 26, 21, 0.28), 0 4px 12px rgba(32, 26, 21, 0.12);
  background-color: #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.cr80-card.landscape {
  width: 512px;
  height: 324px;
}

/* ----------------------------------------------------------------
   TEMPLATE 1: DESIGN C (الملكي الذهبي الهندسي - المطابق للصورة)
   ---------------------------------------------------------------- */
.card-theme-c {
  background-color: #fdfdfd;
  color: #1e293b;
}

/* Geometric Low-Poly Faceted Background (SVG simulated) */
.card-theme-c .card-bg-poly {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(135deg, rgba(230, 235, 242, 0.45) 25%, transparent 25%),
    linear-gradient(225deg, rgba(220, 226, 235, 0.4) 25%, transparent 25%),
    linear-gradient(45deg, rgba(240, 244, 248, 0.5) 25%, transparent 25%),
    linear-gradient(315deg, rgba(215, 222, 232, 0.35) 25%, transparent 25%);
  background-position: 40px 0, 40px 0, 0 0, 0 0;
  background-size: 80px 80px;
  background-repeat: repeat;
  opacity: 0.65;
}

/* Outer & Inner Golden Borders with Accent Notch Corners */
.card-theme-c .gold-outer-border {
  position: absolute;
  inset: 8px;
  border: 2px solid var(--gold-border);
  border-radius: 14px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(196, 145, 90, 0.25);
}

.card-theme-c .gold-inner-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--gold-border);
  pointer-events: none;
}

/* Dark Side Chevron Flaps */
.card-theme-c .side-tab-left {
  position: absolute;
  left: 0;
  top: 175px;
  width: 14px;
  height: 140px;
  background: #201a15;
  clip-path: polygon(0 0, 100% 12%, 100% 88%, 0 100%);
  z-index: 2;
}

.card-theme-c .side-tab-right {
  position: absolute;
  right: 0;
  top: 175px;
  width: 14px;
  height: 140px;
  background: #201a15;
  clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 88%);
  z-index: 2;
}

/* Calligraphy Logo Header */
.card-theme-c .logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 14px;
  position: relative;
  z-index: 5;
}

.card-theme-c .logo-img {
  height: 58px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(158, 99, 45, 0.35));
}

/* Diamond / Rotated Square Gold Photo Frame */
.card-theme-c .photo-frame-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 10px auto 6px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.card-theme-c .photo-diamond-border {
  position: absolute;
  width: 90px;
  height: 90px;
  border: 2.5px solid var(--gold-border);
  transform: rotate(45deg);
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.card-theme-c .photo-diamond-inner {
  position: absolute;
  width: 82px;
  height: 82px;
  border: 1px solid #e8cca5;
  transform: rotate(45deg);
}

.card-theme-c .employee-avatar {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 4px;
  z-index: 6;
  border: 1px solid rgba(0,0,0,0.08);
}

/* Employee Name & Titles */
.card-theme-c .emp-name {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #0f172a;
  text-align: center;
  line-height: 1.25;
  margin-top: 4px;
  padding: 0 14px;
}

.card-theme-c .emp-title-ar {
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  text-align: center;
  margin-top: 2px;
  line-height: 1.2;
}

.card-theme-c .emp-title-en {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #475569;
  text-align: center;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Info lines */
.card-theme-c .emp-meta-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 5px;
  padding: 0 10px;
}

.card-theme-c .emp-dept-row {
  font-size: 0.68rem;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  margin-top: 1px;
}

/* QR Code Section */
.card-theme-c .qr-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
  position: relative;
  z-index: 5;
}

.card-theme-c .qr-frame {
  position: relative;
  padding: 4px;
  background: #ffffff;
  border: 1.5px solid var(--gold-border);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.card-theme-c .qr-img {
  width: 72px;
  height: 72px;
  display: block;
}

.card-theme-c .nfc-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.1;
  text-align: center;
}

.card-theme-c .nfc-icon-box {
  width: 22px;
  height: 22px;
  background: #201a15;
  color: #ffffff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
}

/* Bottom Gold Status Ribbon */
.card-theme-c .bottom-ribbon {
  position: absolute;
  bottom: 12px;
  left: 20px;
  right: 20px;
  background: var(--gold-gradient);
  color: #ffffff;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(158, 99, 45, 0.35);
  z-index: 5;
}

/* ----------------------------------------------------------------
   CARD BACK: DESIGN C
   ---------------------------------------------------------------- */
.card-theme-c-back {
  background-color: #f8fafc;
  color: #1e293b;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.card-theme-c-back .back-header {
  text-align: center;
  width: 100%;
}

.card-theme-c-back .company-title-en {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.card-theme-c-back .sponsor-subtitle {
  font-size: 0.62rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 1px;
}

.card-theme-c-back .contact-box {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  width: 100%;
  text-align: center;
  font-size: 0.64rem;
  font-weight: 700;
  color: #334155;
  line-height: 1.5;
  margin: 6px 0;
}

.card-theme-c-back .return-policy {
  font-size: 0.58rem;
  text-align: center;
  color: #475569;
  line-height: 1.4;
  padding: 0 8px;
}

.card-theme-c-back .security-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-top: 1px solid #cbd5e1;
  padding-top: 8px;
  font-size: 0.58rem;
  font-weight: 800;
  color: #334155;
}

/* ----------------------------------------------------------------
   TEMPLATE 2: MODERN CORPORATE
   ---------------------------------------------------------------- */
.card-theme-corporate {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

.card-theme-corporate .corp-header {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  padding: 14px 16px 28px 16px;
  text-align: center;
  position: relative;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.card-theme-corporate .lanyard-slot {
  width: 44px;
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  margin: 0 auto 8px auto;
}

/* ----------------------------------------------------------------
   TEMPLATE 3: EXECUTIVE OBSIDIAN DARK & GOLD
   ---------------------------------------------------------------- */
.card-theme-dark {
  background: #090d16;
  color: #f8fafc;
  border: 1.5px solid #d4af37;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.7);
}

.card-theme-dark .gold-metallic-text {
  background: linear-gradient(135deg, #fff1b8 0%, #d4af37 50%, #aa8014 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ----------------------------------------------------------------
   TEMPLATE 4: MEDICAL & HSE
   ---------------------------------------------------------------- */
.card-theme-medical {
  background: #ffffff;
  border: 2px solid #0d9488;
}

.card-theme-medical .blood-highlight-badge {
  background: #e11d48;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 900;
  padding: 2px 10px;
  border-radius: 6px;
  display: inline-block;
}

/* ----------------------------------------------------------------
   TEMPLATE 5: VISITOR & CONTRACTOR PASS
   ---------------------------------------------------------------- */
.card-theme-visitor {
  background: #fffbeb;
  border: 2.5px dashed #ea580c;
}

.card-theme-visitor .visitor-hazard-strip {
  background: repeating-linear-gradient(
    45deg,
    #ea580c,
    #ea580c 10px,
    #f97316 10px,
    #f97316 20px
  );
  height: 12px;
  width: 100%;
}

/* ==============================================================
   CR80 LANDSCAPE DYNAMIC RE-LAYOUT CSS (512px × 324px)
   ============================================================== */
.cr80-card.landscape {
  width: 512px;
  height: 324px;
}

/* Template 1: Design C Landscape Front */
.card-theme-c.landscape .c-landscape-container {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 12px 18px 8px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  z-index: 5;
}

.c-landscape-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid rgba(196, 145, 90, 0.35);
  padding-bottom: 6px;
}

.c-landscape-logo-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-img-landscape {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(158, 99, 45, 0.3));
}

.comp-title-ar-landscape {
  font-size: 0.95rem;
  font-weight: 900;
  color: #14100d;
  line-height: 1.1;
}

.comp-title-en-landscape {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #9e632d;
  text-transform: uppercase;
}

.c-landscape-rfid-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #14100d;
  color: #f1d8b6;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.nfc-icon-box-sm {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.c-landscape-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0;
  flex: 1;
}

.c-landscape-photo-zone {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.photo-frame-wrapper-landscape {
  position: relative;
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-diamond-border-landscape {
  position: absolute;
  width: 68px;
  height: 68px;
  border: 2px solid var(--gold-border);
  transform: rotate(45deg);
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}

.photo-diamond-inner-landscape {
  position: absolute;
  width: 62px;
  height: 62px;
  border: 1px solid #e8cca5;
  transform: rotate(45deg);
}

.employee-avatar-landscape {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  z-index: 6;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.c-landscape-info-zone {
  flex: 1;
  text-align: right;
  padding: 0 4px;
}

.emp-name-landscape {
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  color: #0f172a;
  line-height: 1.2;
}

.emp-title-ar-landscape {
  font-size: 0.72rem;
  font-weight: 700;
  color: #c4915a;
  margin-top: 1px;
}

.emp-title-en-landscape {
  font-size: 0.52rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 1px;
}

.emp-meta-pills-landscape {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.meta-pill {
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.62rem;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.meta-pill .meta-lbl {
  color: #64748b;
  font-weight: 600;
}

.meta-pill .meta-val {
  color: #0f172a;
  font-weight: 800;
}

.meta-pill .meta-val.blood {
  color: #dc2626;
}

.c-landscape-qr-zone {
  flex-shrink: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.qr-frame-landscape {
  padding: 3px;
  background: #ffffff;
  border: 1.5px solid var(--gold-border);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.qr-img-landscape {
  width: 64px;
  height: 64px;
  display: block;
}

.qr-caption-landscape {
  font-size: 0.5rem;
  font-weight: 700;
  color: #9e632d;
  margin-top: 2px;
}

.c-landscape-bottom-ribbon {
  background: var(--gold-gradient);
  color: #ffffff;
  text-align: center;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(158, 99, 45, 0.3);
}

.card-theme-c.landscape .side-tab-top-right {
  position: absolute;
  top: 0;
  right: 180px;
  width: 80px;
  height: 7px;
  background: #201a15;
  clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
  z-index: 2;
}

.card-theme-c.landscape .side-tab-top-left {
  position: absolute;
  bottom: 0;
  left: 180px;
  width: 80px;
  height: 7px;
  background: #201a15;
  clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%);
  z-index: 2;
}

/* Template 1 Back Landscape */
.c-back-landscape-grid {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  box-sizing: border-box;
  align-items: center;
  z-index: 5;
}

.c-back-col-right {
  text-align: center;
  border-left: 1.5px dashed #cbd5e1;
  padding-left: 12px;
}

.c-back-logo-landscape {
  height: 40px;
  width: auto;
  margin: 0 auto;
  display: block;
}

.contact-box-landscape {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 10px;
  text-align: right;
  font-size: 0.6rem;
  color: #334155;
  line-height: 1.5;
}

.c-back-col-left {
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 6px 0;
}

.return-policy-landscape {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
}

.security-footer-landscape {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #cbd5e1;
  padding-top: 6px;
}

/* Template 2 Corporate Landscape */
.card-theme-corporate.landscape .corp-landscape-header {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-theme-corporate.landscape .lanyard-slot-landscape {
  width: 38px;
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

.card-theme-corporate.landscape .corp-landscape-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  height: calc(100% - 66px);
  gap: 12px;
}

.card-theme-corporate.landscape .corp-landscape-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 4px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.52rem;
  color: #64748b;
  font-weight: 700;
}

.corp-back-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  height: 100%;
  align-items: center;
}

/* Template 3 Dark Landscape */
.card-theme-dark.landscape .dark-landscape-container {
  position: relative;
  z-index: 5;
  padding: 12px 18px 8px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-sizing: border-box;
}

.dark-landscape-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(196, 145, 90, 0.3);
  padding-bottom: 5px;
}

.dark-landscape-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0;
  flex: 1;
}

/* ----------------------------------------------------------------
   TEMPLATE 6: SUPER CHICKEN (الهوية الرسمية المعتمدة - سوبر جكن)
   ---------------------------------------------------------------- */
.card-theme-superchicken {
  background: #ffffff;
  color: #18181b;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Subtle background security pattern */
.card-theme-superchicken .sc-bg-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(#c41620 0.75px, transparent 0.75px),
    radial-gradient(#ffb300 0.75px, #ffffff 0.75px);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  opacity: 0.08;
  z-index: 1;
}

/* Guilloche curved watermark */
.card-theme-superchicken .sc-watermark-curve {
  position: absolute;
  right: -60px;
  bottom: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px dashed rgba(196, 22, 32, 0.15);
  box-shadow: inset 0 0 0 15px rgba(255, 179, 0, 0.05), inset 0 0 0 35px rgba(196, 22, 32, 0.04);
  pointer-events: none;
  z-index: 1;
}

/* Top curved brand header */
.card-theme-superchicken .sc-header {
  position: relative;
  background: linear-gradient(135deg, #e52d37 0%, #c41620 50%, #8b0a11 100%);
  padding: 10px 14px 12px 14px;
  color: #ffffff;
  border-bottom: 3px solid #ffb300;
  box-shadow: 0 4px 12px rgba(196, 22, 32, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
}

.card-theme-superchicken .sc-header-logo {
  height: 38px;
  max-width: 155px;
  object-fit: contain;
}

/* Mascot & Brand Name Lockup */
.card-theme-superchicken .sc-brand-lockup {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-theme-superchicken .sc-header-mascot {
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}

.card-theme-superchicken .sc-brand-titles {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.15;
}

.card-theme-superchicken .sc-brand-ar {
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.card-theme-superchicken .sc-brand-en {
  font-size: 7.5px;
  font-weight: 900;
  color: #ffb300;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Subtle Anti-Counterfeit Mascot Watermark in Background */
.card-theme-superchicken .sc-mascot-watermark {
  position: absolute;
  left: -20px;
  bottom: 15px;
  width: 170px;
  height: auto;
  opacity: 0.055;
  pointer-events: none;
  z-index: 1;
  filter: grayscale(20%);
}

.card-theme-superchicken .sc-scope-pill {
  background: #ffb300;
  color: #18181b;
  font-size: 9px;
  font-weight: 800;
  padding: 2.5px 8px;
  border-radius: 9999px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  white-space: nowrap;
}

/* Card Body in Portrait */
.card-theme-superchicken .sc-body {
  position: relative;
  z-index: 5;
  padding: 6px 14px 4px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Employee Photo Frame with Red and Gold Rings */
.card-theme-superchicken .sc-photo-container {
  position: relative;
  width: 96px;
  height: 116px;
  margin-top: 1px;
  margin-bottom: 5px;
  border-radius: 14px;
  padding: 3px;
  background: linear-gradient(135deg, #e52d37 0%, #ffb300 50%, #c41620 100%);
  box-shadow: 0 5px 14px rgba(196, 22, 32, 0.2);
}

.card-theme-superchicken .sc-photo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 11px;
  border: 2px solid #ffffff;
  background-color: #f3f4f6;
  display: block;
}

/* RFID / Chip Icon Over Photo Corner */
.card-theme-superchicken .sc-rfid-chip {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 22px;
  height: 22px;
  background: #18181b;
  color: #ffb300;
  border: 1.5px solid #ffb300;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Employee Identity Typography */
.card-theme-superchicken .sc-emp-name-ar {
  font-size: 15.5px;
  font-weight: 900;
  color: #18181b;
  line-height: 1.25;
  margin-top: 2px;
}

.card-theme-superchicken .sc-emp-name-en {
  font-size: 10px;
  font-weight: 700;
  color: #c41620;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 1px;
  margin-bottom: 3px;
}

/* Job Title Badge */
.card-theme-superchicken .sc-job-badge {
  background: #c41620;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 6px;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(196, 22, 32, 0.2);
  margin-bottom: 2px;
  max-width: 92%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-theme-superchicken .sc-job-en {
  font-size: 8px;
  font-weight: 700;
  color: #52525b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

/* Metadata Chips Row */
.card-theme-superchicken .sc-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  width: 100%;
  margin-bottom: 5px;
}

.card-theme-superchicken .sc-meta-chip {
  background: #fdf2f2;
  border: 1px solid rgba(196, 22, 32, 0.15);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 9px;
  color: #3f3f46;
  text-align: center;
}

.card-theme-superchicken .sc-meta-chip strong {
  color: #18181b;
  font-weight: 800;
}

.card-theme-superchicken .sc-branch-strip {
  width: 100%;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 9px;
  color: #92400e;
  font-weight: 800;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* QR Code & Security Row */
.card-theme-superchicken .sc-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #fafafa;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 4px 8px;
  box-sizing: border-box;
}

.card-theme-superchicken .sc-qr-box {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: 1.5px solid #c41620;
  border-radius: 6px;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-theme-superchicken .sc-qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-theme-superchicken .sc-security-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: right;
}

.card-theme-superchicken .sc-sec-pill {
  font-size: 8px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.card-theme-superchicken .sc-sec-pill.active {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.card-theme-superchicken .sc-sec-pill.rfid {
  background: #f4f4f5;
  color: #3f3f46;
  border: 1px solid #d4d4d8;
}

/* Bottom Color Bar */
.card-theme-superchicken .sc-footer-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #c41620 0%, #ffb300 50%, #c41620 100%);
  z-index: 10;
}

/* -----------------------------------------
   SUPER CHICKEN BACK FACE (الوجه الخلفي)
   ----------------------------------------- */
.card-theme-superchicken.back {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-theme-superchicken .sc-back-header {
  background: linear-gradient(135deg, #18181b 0%, #27272a 100%);
  color: #ffffff;
  padding: 8px 12px;
  border-bottom: 2px solid #ffb300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
}

.card-theme-superchicken .sc-back-body {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  justify-content: space-between;
  z-index: 5;
}

/* Return Policy Box - Crucial Mandated Requirement! */
.card-theme-superchicken .sc-return-notice-box {
  background: #fef2f2;
  border: 1.5px solid #c41620;
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(196, 22, 32, 0.08);
}

.card-theme-superchicken .sc-return-notice-ar {
  font-size: 9.5px;
  font-weight: 900;
  color: #991b1b;
  line-height: 1.35;
  margin-bottom: 3px;
}

.card-theme-superchicken .sc-return-notice-en {
  font-size: 7.5px;
  font-weight: 700;
  color: #52525b;
  font-style: italic;
  line-height: 1.2;
}

/* Terms List */
.card-theme-superchicken .sc-terms-list {
  font-size: 8px;
  color: #4b5563;
  line-height: 1.4;
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: right;
}

.card-theme-superchicken .sc-terms-list li {
  position: relative;
  padding-right: 12px;
  margin-bottom: 3px;
}

.card-theme-superchicken .sc-terms-list li::before {
  content: '▪';
  position: absolute;
  right: 0;
  color: #c41620;
  font-size: 10px;
}

/* Back QR & Verification Area */
.card-theme-superchicken .sc-back-qr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
}

.card-theme-superchicken .sc-back-qr-box {
  width: 50px;
  height: 50px;
  background: #ffffff;
  border: 1.5px solid #18181b;
  border-radius: 6px;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-theme-superchicken .sc-back-qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-theme-superchicken .sc-back-meta {
  font-size: 8.5px;
  color: #334155;
  line-height: 1.35;
  flex: 1;
  text-align: right;
}

/* Signature & Barcode area */
.card-theme-superchicken .sc-back-footer {
  border-top: 1px solid #e4e4e7;
  padding-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 8px;
  color: #64748b;
}

/* -----------------------------------------
   SUPER CHICKEN LANDSCAPE MODE (التنسيق العرضي)
   CR80 Specs: 512px x 324px
   ----------------------------------------- */
.card-theme-superchicken.landscape {
  display: flex;
  flex-direction: column;
}

.card-theme-superchicken.landscape .sc-land-header {
  height: 48px;
  background: linear-gradient(135deg, #e52d37 0%, #c41620 50%, #8b0a11 100%);
  border-bottom: 3px solid #ffb300;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  z-index: 5;
}

.card-theme-superchicken.landscape .sc-land-body {
  display: grid;
  grid-template-columns: 110px 1fr 95px;
  gap: 12px;
  padding: 8px 16px;
  align-items: center;
  height: calc(100% - 54px);
  box-sizing: border-box;
  z-index: 5;
}

.card-theme-superchicken.landscape .sc-land-photo-box {
  width: 102px;
  height: 122px;
  border-radius: 12px;
  padding: 3px;
  background: linear-gradient(135deg, #e52d37 0%, #ffb300 50%, #c41620 100%);
  box-shadow: 0 4px 12px rgba(196, 22, 32, 0.2);
  position: relative;
}

.card-theme-superchicken.landscape .sc-land-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
  border: 2px solid #ffffff;
  background: #f4f4f5;
  display: block;
}

.card-theme-superchicken.landscape .sc-land-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
  gap: 2px;
}

.card-theme-superchicken.landscape .sc-land-info .emp-name-ar {
  font-size: 16px;
  font-weight: 900;
  color: #18181b;
  line-height: 1.2;
}

.card-theme-superchicken.landscape .sc-land-info .emp-name-en {
  font-size: 10.5px;
  font-weight: 700;
  color: #c41620;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-theme-superchicken.landscape .sc-land-info .job-title-pill {
  background: #c41620;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2.5px 10px;
  border-radius: 6px;
  display: inline-block;
  align-self: flex-start;
  margin-top: 2px;
}

.card-theme-superchicken.landscape .sc-land-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.card-theme-superchicken.landscape .sc-land-meta-chips span {
  background: #fdf2f2;
  border: 1px solid rgba(196, 22, 32, 0.15);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 8.5px;
  color: #374151;
  font-weight: 700;
}

.card-theme-superchicken.landscape .sc-land-qr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.card-theme-superchicken.landscape .sc-land-qr-box {
  width: 72px;
  height: 72px;
  background: #ffffff;
  border: 2px solid #c41620;
  border-radius: 8px;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-theme-superchicken.landscape .sc-land-qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Landscape Back Face */
.card-theme-superchicken.landscape.back .sc-land-back-body {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 14px;
  padding: 10px 16px;
  height: calc(100% - 50px);
  box-sizing: border-box;
  align-items: center;
  z-index: 5;
}

/* ----------------------------------------------------------------
   TEMPLATE 7: REINFORCED PRODUCTION BADGE (الباجات المقواة لعمال المعمل والإنتاج)
   High-durability laminated pouch design for Central Kitchen & Factory
   ---------------------------------------------------------------- */
.card-theme-reinforced {
  background: #ffffff;
  color: #18181b;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  border: 4px solid #f1f5f9;
  box-shadow: 0 0 0 1px #cbd5e1, 0 10px 25px -5px rgba(0,0,0,0.2);
}

/* Laminated Sealed Pouch Border Simulation */
.card-theme-reinforced::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid rgba(255, 255, 255, 0.8);
  pointer-events: none;
  z-index: 20;
}

/* Slot punch hole simulation */
.card-theme-reinforced .rf-slot-hole {
  width: 32px;
  height: 9px;
  background: #0f172a;
  border-radius: 9999px;
  margin: 4px auto 3px auto;
  border: 1px solid #475569;
  position: relative;
  z-index: 10;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
}

/* Hazard / Production Strip */
.card-theme-reinforced .rf-hazard-strip {
  height: 6px;
  background: repeating-linear-gradient(
    45deg,
    #c41620,
    #c41620 10px,
    #ffb300 10px,
    #ffb300 20px
  );
  width: 100%;
}

/* Reinforced Header */
.card-theme-reinforced .rf-header {
  background: #18181b;
  color: #ffffff;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #ffb300;
}

.card-theme-reinforced .rf-header-title {
  font-size: 10px;
  font-weight: 900;
  color: #ffb300;
  letter-spacing: 0.5px;
}

.card-theme-reinforced .rf-badge-pill {
  background: #c41620;
  color: #ffffff;
  font-size: 8px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Reinforced Body */
.card-theme-reinforced .rf-body {
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 5;
}

/* Worker Photo */
.card-theme-reinforced .rf-photo-box {
  width: 86px;
  height: 104px;
  border: 2px solid #18181b;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  margin-top: 2px;
  margin-bottom: 5px;
  background: #e2e8f0;
}

.card-theme-reinforced .rf-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-theme-reinforced .rf-emp-name {
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.2;
}

.card-theme-reinforced .rf-section-badge {
  background: #0284c7;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2.5px 10px;
  border-radius: 6px;
  margin: 3px 0;
  display: inline-block;
}

.card-theme-reinforced .rf-meta-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 4px;
  margin: 3px 0;
  font-size: 9px;
  font-weight: 700;
}

.card-theme-reinforced .rf-meta-row span {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 2px 6px;
  border-radius: 4px;
  flex: 1;
}

/* Barcode & QR Box */
.card-theme-reinforced .rf-codes-container {
  margin-top: 4px;
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.card-theme-reinforced .rf-barcode-img {
  height: 38px;
  flex: 1;
  object-fit: contain;
}

.card-theme-reinforced .rf-qr-box {
  width: 44px;
  height: 44px;
  border: 1.5px solid #0f172a;
  border-radius: 4px;
  padding: 1px;
  background: #ffffff;
  flex-shrink: 0;
}

.card-theme-reinforced .rf-qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Reinforced Back Face */
.card-theme-reinforced.back {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-theme-reinforced .rf-hygiene-rules {
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  border-radius: 8px;
  padding: 6px 8px;
  margin: 6px 10px;
  text-align: right;
  font-size: 8px;
  color: #065f46;
  line-height: 1.4;
}

.card-theme-reinforced .rf-hygiene-title {
  font-size: 9px;
  font-weight: 900;
  color: #047857;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

/* Reinforced Landscape */
.card-theme-reinforced.landscape .rf-land-body {
  display: grid;
  grid-template-columns: 100px 1fr 100px;
  gap: 10px;
  padding: 8px 14px;
  align-items: center;
  height: calc(100% - 48px);
}

/* ----------------------------------------------------------------
   PRINT LAYOUT STYLES (@media print)
   Standard CR80 exact 85.6mm x 54mm PVC printing
   ---------------------------------------------------------------- */
@media print {
  @page {
    size: 54mm 85.6mm;
    margin: 0;
  }

  body {
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .no-print {
    display: none !important;
  }

  .cr80-card {
    box-shadow: none !important;
    border-radius: 0 !important;
    page-break-after: always;
    page-break-inside: avoid;
    width: 54mm !important;
    height: 85.6mm !important;
  }

  .cr80-card.landscape {
    width: 85.6mm !important;
    height: 54mm !important;
  }

  /* Sheet Layout for standard A4 paper printing */
  .a4-print-sheet {
    display: grid !important;
    grid-template-columns: repeat(2, 54mm);
    gap: 10mm;
    justify-content: center;
    padding: 15mm;
  }
}
