/* ==========================================================================
   Wall & Door Flashcards Stylesheet
   Tailored for Door/Wall Sticky Review & High-Resolution A4 Cut-out Printing
   ========================================================================== */

:root {
  --font-ar: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-de: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --primary: #2563eb;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-ar);
  background: #f8fafc;
  color: var(--slate-900);
  line-height: 1.5;
  direction: rtl;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- App Header ---------------- */
.app-header {
  background: var(--slate-900);
  color: #fff;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-pin {
  font-size: 2rem;
  background: #f59e0b;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.brand-group h1 {
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.3;
}

.brand-group p {
  font-size: 0.78rem;
  color: #94a3b8;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-head {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-print {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}
.btn-print:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-mode {
  background: #f59e0b;
  color: #0f172a;
}
.btn-mode:hover {
  background: #d97706;
  color: #fff;
}

.btn-link {
  background: #2563eb;
  color: #fff;
}

.btn-audio {
  background: #7c3aed;
  color: #fff;
}

/* ---------------- Tips Banner ---------------- */
.tips-banner-section {
  max-width: 1200px;
  margin: 14px auto 0 auto;
  padding: 0 16px;
}

.tips-banner {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1.5px dashed #f59e0b;
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #92400e;
  font-size: 0.86rem;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
}

.tip-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

/* ---------------- Filter & Search Section ---------------- */
.filter-section {
  max-width: 1200px;
  margin: 14px auto;
  padding: 0 16px;
}

.search-wrap {
  position: relative;
  margin-bottom: 12px;
}

.search-box {
  width: 100%;
  padding: 11px 44px 11px 16px;
  background: #fff;
  border: 1.5px solid var(--slate-200);
  border-radius: 12px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--slate-800);
  outline: none;
  transition: border-color 0.2s;
}
.search-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-clear-search {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
}

.category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.cat-chip {
  flex-shrink: 0;
  background: #fff;
  border: 1.5px solid var(--slate-200);
  color: var(--slate-700);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.cat-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.cat-chip.active {
  background: var(--slate-900);
  color: #fff;
  border-color: var(--slate-900);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.cat-chip.cat-fav.active {
  background: #e11d48;
  border-color: #e11d48;
}

/* ---------------- Main Cards Grid ---------------- */
.cards-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px 60px 16px;
}

.wall-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* Individual Wall Card (Modern, Clean, High-Impact) */
.wall-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px 20px 14px 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  border: 1.5px solid #cbd5e1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.wall-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border-color: #94a3b8;
}

/* Subtle Card Top Tag */
.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 6px;
}

.card-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-card-fav {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #cbd5e1;
  cursor: pointer;
  transition: transform 0.15s;
}
.btn-card-fav.is-fav {
  color: #f59e0b;
}

/* Big High-Contrast German Statement (The Hero) */
.card-german-phrase {
  font-family: var(--font-de);
  font-size: 1.35rem;
  font-weight: 900;
  color: #0f172a;
  direction: ltr;
  text-align: left;
  line-height: 1.3;
  margin-bottom: 6px;
}

.hl-card-weil {
  color: #b45309;
  text-decoration: underline;
  text-decoration-thickness: 2.5px;
}

.hl-card-verb {
  color: #0369a1;
  border-bottom: 2px dashed #0369a1;
}

.hl-card-key {
  color: #0f172a;
  font-weight: 900;
  text-decoration: underline;
}

/* Direct Arabic Translation */
.card-arabic-translation {
  font-size: 1.02rem;
  color: #1e293b;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

/* On-Screen Grammar Rule Strip */
.card-rule-strip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.35;
}
.card-rule-strip b {
  color: #0f172a;
}
.rule-chip-icon {
  font-size: 0.95rem;
}

/* Subdued Explanation Box at Bottom (خط صغير تحت بدون زحمة ألوان) */
.card-secret-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-right: 3px solid #334155;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.4;
}

.card-secret-title {
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-applies-box {
  font-size: 0.7rem;
  color: #64748b;
  margin-bottom: 10px;
  line-height: 1.3;
}

/* Card Bottom Action Bar */
.card-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.btn-card-audio {
  background: #0f172a;
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s;
}
.btn-card-audio:hover {
  background: #334155;
}

.card-number-label {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 700;
}

/* ---------------- Slideshow Fullscreen Modal ---------------- */
.slideshow-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.slideshow-box {
  background: #ffffff;
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

.slideshow-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 10px;
}

.slideshow-count {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #64748b;
  cursor: pointer;
  font-family: inherit;
}

.slideshow-card-inner {
  padding: 20px 0;
  text-align: center;
}

.slide-badge-wrap {
  margin-bottom: 14px;
}

.slide-german-huge {
  font-family: var(--font-de);
  font-size: 1.6rem;
  font-weight: 900;
  color: #0f172a;
  direction: ltr;
  text-align: center;
  line-height: 1.35;
  margin-bottom: 14px;
}

.slide-arabic-huge {
  font-size: 1.15rem;
  color: #334155;
  font-weight: 700;
  margin-bottom: 20px;
}

.slideshow-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.btn-slide-nav {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: var(--slate-700);
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}

.btn-slide-speak {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
}

/* ---------------- Print Modal Sheet ---------------- */
.print-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.print-modal-box {
  background: #fff;
  border-radius: 16px;
  max-width: 540px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.print-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.print-layout-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}

.print-opt-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
.print-opt-card input {
  margin-top: 4px;
}
.print-opt-card span {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}

.print-scope-selector {
  background: #f1f5f9;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.print-scope-chips {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.scope-chip {
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.print-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-confirm-print {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

.btn-preview-print {
  background: #0f172a;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.btn-preview-print:hover {
  background: #334155;
}

/* ---------------- Print Preview Modal ---------------- */
.preview-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.preview-modal-box {
  background: #f1f5f9;
  border-radius: 16px;
  width: 95%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.preview-modal-head {
  background: #fff;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #e2e8f0;
}
.preview-modal-head h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}
.preview-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Preview Sheet Simulator (Exact A4 look on screen) */
.preview-a4-sheet {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 20px;
}

/* Base print card styling for preview on screen */
.preview-a4-sheet .print-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.preview-a4-sheet .print-grid-6 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.preview-a4-sheet .print-cutout-card {
  border: 2px solid #0f172a;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.preview-a4-sheet .print-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #0f172a;
  padding-bottom: 4px;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 900;
}
.preview-a4-sheet .print-card-body {
  padding: 10px 0;
}
.preview-a4-sheet .print-grid-4 .print-card-german {
  font-family: var(--font-de);
  font-size: 1.85rem;
  font-weight: 900;
  color: #000;
  line-height: 1.25;
  direction: ltr;
  text-align: left;
}
.preview-a4-sheet .print-grid-6 .print-card-german {
  font-family: var(--font-de);
  font-size: 1.45rem;
  font-weight: 900;
  color: #000;
  line-height: 1.25;
  direction: ltr;
  text-align: left;
}
.preview-a4-sheet .print-grid-4 .print-card-arabic {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 6px;
}
.preview-a4-sheet .print-grid-6 .print-card-arabic {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 5px;
}
.preview-a4-sheet .print-card-rule {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 10px;
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #0f172a;
}
.preview-a4-sheet .print-grid-4 .print-card-rule {
  padding: 8px 12px;
  font-size: 0.88rem;
  margin: 10px 0;
}
.preview-a4-sheet .print-grid-6 .print-card-rule {
  padding: 5px 8px;
  font-size: 0.74rem;
  margin: 6px 0;
}
.preview-a4-sheet .print-rule-badge {
  background: #0f172a;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.preview-a4-sheet .print-rule-text {
  font-weight: 700;
  color: #1e293b;
  flex: 1;
}
.preview-a4-sheet .print-rule-text b,
.preview-a4-sheet .print-rule-text u {
  color: #000000;
  font-weight: 900;
}
.preview-a4-sheet .print-kw-weil {
  display: inline-block;
  padding: 1px 5px;
  border: 1.5px solid #000;
  border-radius: 4px;
  font-weight: 900;
  margin: 0 2px;
}
.preview-a4-sheet .print-kw-verb {
  display: inline-block;
  padding: 1px 4px;
  border-bottom: 2.5px double #000;
  font-weight: 900;
  margin: 0 2px;
}
.preview-a4-sheet .print-kw-comp {
  border-bottom: 2px solid #000;
  font-weight: 900;
}
.preview-a4-sheet .print-card-footer {
  border-top: 1.5px solid #0f172a;
  padding-top: 6px;
  margin-top: 8px;
  font-size: 0.72rem;
  color: #334155;
  line-height: 1.35;
}

/* ==========================================================================
   HIGH-RESOLUTION PRINT ENGINE (Minimalist, Ink-Friendly, Zero-Waste Door Cards)
   ========================================================================== */
.print-wall-container {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 6mm 6mm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-family: var(--font-ar) !important;
  }

  .app-header,
  .tips-banner-section,
  .filter-section,
  .cards-container,
  .slideshow-modal,
  .print-modal-overlay {
    display: none !important;
  }

  .print-wall-container {
    display: block !important;
  }

  .print-page-a4 {
    width: 100%;
    page-break-after: always;
    page-break-inside: avoid;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 98vh;
  }

  .print-page-a4:last-child {
    page-break-after: auto;
  }

  .print-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000000;
    padding-bottom: 4px;
    margin-bottom: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #000000;
  }

  /* Grid 4 (4 Huge Impact Door Cards per A4 Page - 2 rows x 2 cols) */
  .print-grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8mm;
    flex: 1;
  }

  /* Grid 6 (6 Practical Flashcards per A4 Page - 3 rows x 2 cols) */
  .print-grid-6 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 6mm;
    flex: 1;
  }

  /* The Minimalist Elegant Print Card (Clean frame, No rainbow clutter, Zero wasted space) */
  .print-cutout-card {
    border: 2px solid #0f172a;
    border-radius: 8px;
    padding: 12px 14px 10px 14px;
    background: #ffffff !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    page-break-inside: avoid;
    overflow: hidden;
  }

  .print-grid-4 .print-cutout-card {
    padding: 16px 18px 12px 18px;
    border-width: 2.5px;
  }

  /* Card Top Row */
  .print-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px solid #0f172a;
    padding-bottom: 4px;
    margin-bottom: 6px;
  }

  .print-card-badge {
    font-size: 0.75rem;
    font-weight: 900;
    color: #000000;
  }

  .print-grid-4 .print-card-badge {
    font-size: 0.82rem;
  }

  .print-card-cut-note {
    font-size: 0.65rem;
    color: #475569;
    font-weight: 700;
  }

  /* Hero Body: Huge, Crystal-Clear German Statement, Arabic & Grammar Rule */
  .print-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 6px;
    padding: 6px 0;
  }

  .print-grid-4 .print-card-body {
    gap: 12px;
    padding: 10px 0;
  }

  .print-card-german {
    font-family: var(--font-de);
    font-weight: 900;
    color: #000000;
    direction: ltr;
    text-align: left;
    margin-bottom: 2px;
  }

  /* 4-Card Huge Size: Super clear from 2-3 meters away on a door */
  .print-grid-4 .print-card-german {
    font-size: 2.15rem;
    line-height: 1.25;
  }

  /* 6-Card Size: Punchy, prominent, zero awkward void */
  .print-grid-6 .print-card-german {
    font-size: 1.6rem;
    line-height: 1.22;
  }

  .print-kw-weil {
    display: inline-block;
    padding: 1px 6px;
    border: 2px solid #000000;
    border-radius: 4px;
    font-weight: 900;
    margin: 0 2px;
  }

  .print-kw-verb {
    display: inline-block;
    padding: 1px 4px;
    border-bottom: 3.5px double #000000;
    font-weight: 900;
    margin: 0 2px;
  }

  .print-kw-comp {
    border-bottom: 2.5px solid #000000;
    font-weight: 900;
  }

  /* Direct Arabic Translation */
  .print-card-arabic {
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
  }

  .print-grid-4 .print-card-arabic {
    font-size: 1.3rem;
  }

  .print-grid-6 .print-card-arabic {
    font-size: 1.1rem;
  }

  /* Dedicated Grammar Rule Box (Eliminates empty gaps, clarifies weil & grammar) */
  .print-card-rule {
    background: #ffffff !important;
    border: 1.5px solid #000000 !important;
    border-radius: 6px;
    padding: 5px 8px;
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    line-height: 1.3;
    color: #000000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-grid-4 .print-card-rule {
    padding: 8px 12px;
    font-size: 0.88rem;
    margin: 8px 0;
    border-width: 2px !important;
  }

  .print-rule-badge {
    background: #000000 !important;
    color: #ffffff !important;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-grid-4 .print-rule-badge {
    font-size: 0.78rem;
    padding: 3px 8px;
  }

  .print-rule-text {
    font-weight: 700;
    color: #000000;
    flex: 1;
  }

  .print-rule-text b,
  .print-rule-text u {
    color: #000000;
    font-weight: 900;
  }

  /* Compact Subdued Explanation at Bottom (بخط صغير تحـت) */
  .print-card-footer {
    border-top: 1.5px solid #0f172a;
    padding-top: 6px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .print-grid-4 .print-card-footer {
    padding-top: 8px;
    gap: 4px;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #1e293b;
  }

  .print-grid-6 .print-card-footer {
    font-size: 0.7rem;
    line-height: 1.28;
    color: #334155;
  }

  .print-footer-tip {
    font-weight: 600;
  }

  .print-footer-tip strong {
    font-weight: 800;
    color: #000000;
  }

  .print-footer-applies {
    color: #475569;
  }
}
