/* ═══════════════════════════════════════════
   منصة خدمة — Professional Document Website
   Screen + Print (PDF) Optimized
   ═══════════════════════════════════════════ */

:root {
  --primary: #0d4f4f;
  --primary-light: #1a7373;
  --primary-dark: #083838;
  --accent: #c9a227;
  --accent-light: #e8c547;
  --text: #1a2332;
  --text-muted: #5a6578;
  --bg: #f4f6f9;
  --white: #ffffff;
  --border: #dde3ec;
  --shadow: 0 4px 24px rgba(13, 79, 79, 0.08);
  --shadow-lg: 0 12px 48px rgba(13, 79, 79, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --font: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  direction: rtl;
}

/* ─── Navigation ─── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.nav-brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.nav-links a {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
  background: rgba(13, 79, 79, 0.06);
}

.btn-print {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn-print:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 79, 79, 0.3);
}

/* ─── Document Container ─── */
.document {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.page {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2.5rem 3rem;
  margin-bottom: 2rem;
}

/* ─── Cover Page ─── */
.cover-page {
  position: relative;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 3rem;
  overflow: hidden;
  background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 45%, var(--primary-light) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
}

.cover-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(201, 162, 39, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

.cover-content {
  position: relative;
  z-index: 1;
}

.cover-badge {
  display: inline-block;
  padding: 0.35rem 1.25rem;
  background: rgba(201, 162, 39, 0.25);
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.cover-logo {
  margin-bottom: 1.5rem;
}

.logo-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--primary-dark);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.cover-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.cover-title em {
  font-style: normal;
  color: var(--accent-light);
}

.cover-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 500;
  opacity: 0.95;
  margin-bottom: 1.5rem;
}

.cover-divider {
  width: 80px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}

.cover-desc {
  font-size: 1.05rem;
  opacity: 0.88;
  line-height: 1.9;
  max-width: 520px;
  margin: 0 auto 2rem;
}

.cover-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  opacity: 0.75;
  flex-wrap: wrap;
}

.meta-dot {
  opacity: 0.5;
}

.cover-footer {
  position: relative;
  z-index: 1;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.85rem;
  opacity: 0.7;
  max-width: 600px;
}

/* ─── Table of Contents ─── */
.toc-list {
  list-style: none;
  counter-reset: toc;
}

.toc-list li {
  border-bottom: 1px solid var(--border);
}

.toc-list li:last-child {
  border-bottom: none;
}

.toc-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: all 0.2s;
}

.toc-list a:hover {
  color: var(--primary);
  padding-right: 1rem;
}

.toc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ─── Section Headers ─── */
.section-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 3px solid var(--primary);
  position: relative;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: -3px;
  right: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
}

.section-num {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.35;
}

.section-desc {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

.sub-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin: 2rem 0 1rem;
  padding-right: 0.75rem;
  border-right: 4px solid var(--accent);
}

.intro-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.85;
}

/* ─── Cards ─── */
.card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.card.highlight-card {
  background: linear-gradient(135deg, rgba(13, 79, 79, 0.04), rgba(13, 79, 79, 0.08));
  border-color: rgba(13, 79, 79, 0.15);
}

.card.highlight-card.accent {
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.06), rgba(201, 162, 39, 0.12));
  border-color: rgba(201, 162, 39, 0.25);
}

.card-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.card-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.card-body p {
  color: var(--text-muted);
  line-height: 1.8;
}

.vision-box {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 1.75rem 2rem;
  border-radius: var(--radius);
  margin: 1.5rem 0 2rem;
}

.vision-label {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--accent-light);
}

.vision-box p {
  opacity: 0.92;
  line-height: 1.85;
}

/* ─── Goals Grid ─── */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.goal-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.goal-item:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

.goal-num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--white);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.goal-item p {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
}

/* ─── Four Columns ─── */
.four-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.mini-card {
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.mini-card span {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.5rem;
}

.mini-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.mini-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ─── Law Blocks ─── */
.law-block {
  padding: 1.25rem 1.5rem;
  border-right: 4px solid var(--primary);
  background: var(--bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1rem;
}

.law-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.law-badge {
  padding: 0.2rem 0.65rem;
  background: var(--primary);
  color: var(--white);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.law-header h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.law-en {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  width: 100%;
}

.law-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ─── Check Lists ─── */
.check-list {
  list-style: none;
  padding: 0;
}

.check-list li {
  position: relative;
  padding: 0.45rem 1.5rem 0.45rem 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
}

.check-list li::before {
  content: '●';
  position: absolute;
  right: 0;
  color: var(--primary-light);
  font-size: 0.6rem;
  top: 0.65rem;
}

.check-list.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 1.5rem;
}

/* ─── Services Grid ─── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.service-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.service-header {
  padding: 1.25rem 1.5rem;
  color: var(--white);
}

.service-header span {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.35rem;
}

.service-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.service-header p {
  font-size: 0.8rem;
  opacity: 0.85;
}

.service-header.recruitment { background: linear-gradient(135deg, #1a5276, #2e86ab); }
.service-header.financial { background: linear-gradient(135deg, #7d6608, #b7950b); }
.service-header.healthcare { background: linear-gradient(135deg, #145a32, #1e8449); }
.service-header.monitoring { background: linear-gradient(135deg, #512e5f, #7d3c98); }
.service-header.digital { background: linear-gradient(135deg, #1a5276, #3498db); }
.service-header.training { background: linear-gradient(135deg, #784212, #d68910); }
.service-header.legal-svc { background: linear-gradient(135deg, #4a235a, #8e44ad); }
.service-header.residence { background: linear-gradient(135deg, #1b4f72, #2874a6); }

.service-card ul {
  list-style: none;
  padding: 1rem 1.25rem 1.25rem;
}

.service-card ul li {
  position: relative;
  padding: 0.35rem 1.25rem 0.35rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.service-card ul li:last-child {
  border-bottom: none;
}

.service-card ul li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--primary-light);
  font-size: 0.75rem;
  font-weight: 700;
}

.services-grid.compact .service-card.compact .service-header {
  padding: 1rem 1.25rem;
}

.services-grid.compact .service-card.compact .service-header h3 {
  font-size: 0.95rem;
}

/* ─── Phases ─── */
.phases {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.phase {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.phase-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  color: var(--white);
}

.phase-header.prep { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.phase-header.pilot { background: linear-gradient(135deg, #1a5276, #2e86ab); }
.phase-header.expansion { background: linear-gradient(135deg, #145a32, #1e8449); }

.phase-icon {
  font-size: 1.75rem;
}

.phase-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.phase-header span {
  font-size: 0.8rem;
  opacity: 0.85;
}

.phase-body {
  padding: 1.25rem 1.5rem;
  background: var(--bg);
}

.phase-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.phase-body.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.phase.compact {
  margin-bottom: 1rem;
}

.phase.compact h4 {
  padding: 1rem 1.25rem;
  background: var(--primary);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
}

.phase.compact .check-list {
  padding: 1rem 1.25rem 1.25rem;
  background: var(--bg);
}

/* ─── Tables ─── */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 1rem 1.25rem;
  text-align: right;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:nth-child(even) td {
  background: rgba(13, 79, 79, 0.02);
}

.table-list {
  list-style: none;
  padding: 0;
}

.table-list li {
  padding: 0.25rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.table-list li::before {
  content: '• ';
  color: var(--primary-light);
}

/* ─── Incentive Grid ─── */
.incentive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.incentive-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, rgba(13, 79, 79, 0.06), rgba(13, 79, 79, 0.12));
  border: 1px solid rgba(13, 79, 79, 0.15);
  border-radius: var(--radius);
}

.incentive-card.special {
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.1), rgba(201, 162, 39, 0.2));
  border-color: rgba(201, 162, 39, 0.3);
}

.incentive-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.incentive-card.special .incentive-value {
  color: var(--accent);
}

.incentive-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 0.5rem 0 0.25rem;
}

.incentive-period {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Alert Box ─── */
.alert-box {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.75;
}

.alert-box.warning {
  background: #fef9e7;
  border: 1px solid #f4d03f;
  border-right: 4px solid #f39c12;
  color: #7d6608;
}

/* ─── Steps Flow ─── */
.steps-flow {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.step {
  padding: 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  position: relative;
  padding-right: 4rem;
}

.step-num {
  position: absolute;
  right: 1.25rem;
  top: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
}

.step h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.step ul {
  list-style: none;
  padding: 0;
}

.step ul li {
  position: relative;
  padding: 0.3rem 1.25rem 0.3rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.step ul li::before {
  content: '→';
  position: absolute;
  right: 0;
  color: var(--primary-light);
  font-size: 0.75rem;
}

/* ─── Two Panel ─── */
.two-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.panel {
  padding: 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.panel h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
}

/* ─── Infrastructure Diagram ─── */
.infra-diagram {
  margin-bottom: 2rem;
}

.infra-layer {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  text-align: center;
}

.infra-layer.users {
  background: linear-gradient(135deg, rgba(26, 82, 118, 0.1), rgba(46, 134, 171, 0.15));
  border: 1px solid rgba(26, 82, 118, 0.2);
}

.infra-layer.core {
  background: linear-gradient(135deg, rgba(13, 79, 79, 0.1), rgba(26, 115, 115, 0.15));
  border: 1px solid rgba(13, 79, 79, 0.2);
}

.infra-layer.tech {
  background: var(--bg);
  border: 1px dashed var(--border);
}

.infra-layer h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.infra-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.infra-items span {
  padding: 0.4rem 0.85rem;
  background: var(--white);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

.infra-arrow {
  text-align: center;
  color: var(--primary-light);
  font-size: 1.25rem;
  padding: 0.35rem;
}

/* ─── Compliance Grid ─── */
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.compliance-card {
  padding: 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.compliance-card > span {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.compliance-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.compliance-card ul {
  list-style: none;
  padding: 0;
}

.compliance-card ul li {
  position: relative;
  padding: 0.3rem 1.25rem 0.3rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.compliance-card ul li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--primary-light);
  font-size: 0.75rem;
}

/* ─── Benefits ─── */
.benefits-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.benefit-col {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.benefit-header {
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  text-align: center;
}

.benefit-header.worker { background: linear-gradient(135deg, #1a5276, #2e86ab); }
.benefit-header.employer { background: linear-gradient(135deg, #7d6608, #b7950b); }
.benefit-header.gov { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }

.benefit-col ul {
  list-style: none;
  padding: 1rem 1.25rem;
  background: var(--bg);
}

.benefit-col ul li {
  position: relative;
  padding: 0.35rem 1.25rem 0.35rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.benefit-col ul li:last-child {
  border-bottom: none;
}

.benefit-col ul li::before {
  content: '●';
  position: absolute;
  right: 0;
  color: var(--primary-light);
  font-size: 0.5rem;
  top: 0.55rem;
}

/* ─── KPI Grid ─── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

.kpi {
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.kpi-val {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.kpi-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin: 0.35rem 0 0.15rem;
}

.kpi-desc {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ─── Conclusion ─── */
.conclusion-hero {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.conclusion-hero p {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.7;
}

.conclusion-checks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.check-item {
  padding: 0.85rem 1.25rem;
  background: rgba(30, 132, 73, 0.08);
  border: 1px solid rgba(30, 132, 73, 0.2);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #145a32;
}

.vision-future {
  padding: 1.75rem 2rem;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.08), rgba(201, 162, 39, 0.15));
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.vision-future h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.vision-future p {
  color: var(--text-muted);
  line-height: 1.85;
}

.closing {
  text-align: center;
  padding: 2.5rem 2rem;
  border-top: 2px solid var(--border);
}

.thanks {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.tagline {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.footer-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ─── NFC Identity Cards ─── */
.id-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.id-card-version {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  display: flex;
  flex-direction: column;
}

.id-card-visual {
  padding: 1.25rem;
  background: linear-gradient(135deg, #eef2f7, #e4eaf2);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
}

.id-card-mock {
  width: 220px;
  height: 138px;
  border-radius: 12px;
  padding: 10px 12px;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  color: white;
  overflow: hidden;
}

.id-card-mock.standard {
  background: linear-gradient(135deg, #0d4f4f, #1a7373);
}

.id-card-mock.temporary {
  background: linear-gradient(135deg, #7d6608, #b7950b);
}

.id-card-mock.premium {
  background: linear-gradient(135deg, #1a5276, #2e86ab);
}

.id-card-mock.supervisor {
  background: linear-gradient(135deg, #512e5f, #7d3c98);
}

.id-card-mock.inspector {
  background: linear-gradient(135deg, #145a32, #1e8449);
}

.id-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.6rem;
  font-weight: 600;
  opacity: 0.95;
  margin-bottom: 6px;
}

.id-nfc-icon {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 5px;
  border-radius: 4px;
}

.id-card-photo {
  width: 36px;
  height: 44px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  float: right;
  margin-left: 8px;
}

.id-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.id-name {
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.3;
}

.id-num {
  font-size: 0.55rem;
  opacity: 0.8;
  font-family: monospace;
  letter-spacing: 0.03em;
}

.id-card-chip {
  position: absolute;
  bottom: 28px;
  left: 12px;
  width: 28px;
  height: 22px;
  background: linear-gradient(135deg, #c9a227, #e8c547);
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.id-card-chip::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 2px;
}

.id-temp-stripe,
.id-premium-stripe {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3px;
  text-align: center;
  font-size: 0.55rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.25);
}

.id-phone-frame {
  width: 100px;
  height: 160px;
  background: #1a2332;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.id-phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #0d4f4f, #1a7373);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: white;
  padding: 10px;
}

.id-phone-nfc {
  font-size: 1.25rem;
}

.id-phone-title {
  font-size: 0.7rem;
  font-weight: 700;
}

.id-phone-sub {
  font-size: 0.55rem;
  opacity: 0.8;
}

.id-phone-qr {
  margin-top: 8px;
  width: 40px;
  height: 40px;
  background: white;
  color: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.id-card-meta {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
}

.id-version-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.id-version-badge.temp { background: #b7950b; }
.id-version-badge.premium { background: #2e86ab; }
.id-version-badge.digital { background: #1a5276; }
.id-version-badge.supervisor { background: #7d3c98; }
.id-version-badge.inspector { background: #1e8449; }

.id-card-meta h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
}

.id-target {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.id-card-meta ul {
  list-style: none;
  padding: 0;
}

.id-card-meta ul li {
  position: relative;
  padding: 0.3rem 1.1rem 0.3rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.id-card-meta ul li:last-child {
  border-bottom: none;
}

.id-card-meta ul li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--primary-light);
  font-size: 0.7rem;
  font-weight: 700;
}

.nfc-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.nfc-spec {
  padding: 1.15rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.nfc-spec span {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.35rem;
}

.nfc-spec strong {
  display: block;
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.nfc-spec p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.nfc-use-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.nfc-use-item {
  padding: 1.15rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: box-shadow 0.2s;
}

.nfc-use-item:hover {
  box-shadow: var(--shadow);
}

.nfc-use-item span {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.35rem;
}

.nfc-use-item h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.nfc-use-item p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.id-lifecycle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.lifecycle-step {
  text-align: center;
  padding: 0.75rem 0.5rem;
  min-width: 90px;
}

.lc-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  margin: 0 auto 0.35rem;
}

.lifecycle-step strong {
  display: block;
  font-size: 0.82rem;
  color: var(--primary);
  margin-bottom: 0.15rem;
}

.lifecycle-step p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.lifecycle-arrow {
  color: var(--primary-light);
  font-size: 1rem;
  font-weight: 700;
  opacity: 0.6;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .page {
    padding: 1.75rem 1.25rem;
  }

  .four-cols,
  .services-grid,
  .two-panel,
  .compliance-grid,
  .benefits-three,
  .phase-body.two-col,
  .check-list.two-col,
  .conclusion-checks {
    grid-template-columns: 1fr;
  }

  .id-cards-grid,
  .nfc-specs-grid,
  .nfc-use-grid {
    grid-template-columns: 1fr;
  }

  .id-lifecycle {
    flex-direction: column;
  }

  .lifecycle-arrow {
    transform: rotate(-90deg);
  }

  .incentive-grid,
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-links {
    display: none;
  }

  .cover-page {
    min-height: 70vh;
    padding: 3rem 1.5rem;
  }
}

/* ═══════════════════════════════════════════
   PRINT / PDF STYLES
   ═══════════════════════════════════════════ */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 12mm;
  }

  :root {
    --print-content-h: 277mm; /* 297mm - margins top/bottom */
    --print-content-w: 186mm; /* 210mm -左右 12mm×2 */
  }

  html {
    font-size: 10pt;
  }

  body {
    background: white;
    color: #1a2332;
    line-height: 1.55;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

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

  .document {
    max-width: 100%;
    width: var(--print-content-w);
    padding: 0;
    margin: 0 auto;
  }

  /* ─── تدفق الصفحات: لا تجميد الأقسام الطويلة ─── */
  .page {
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    page-break-inside: auto;
    break-inside: auto;
  }

  .print-section-start {
    break-before: page;
    page-break-before: always;
    padding-top: 0;
  }

  /* ─── الغلاف: ملء صفحة A4 بدقة ─── */
  .cover-page {
    width: var(--print-content-w);
    height: var(--print-content-h);
    min-height: var(--print-content-h);
    max-height: var(--print-content-h);
    margin: 0;
    padding: 18mm 10mm 12mm;
    overflow: hidden;
    box-sizing: border-box;
    page-break-after: always;
    break-after: page;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .cover-title {
    font-size: 28pt;
  }

  .cover-subtitle {
    font-size: 13pt;
  }

  .cover-desc {
    font-size: 10pt;
  }

  .cover-footer {
    margin-top: auto;
    padding-top: 8mm;
  }

  /* ─── الفهرس: يتدفق مع القسم التالي إن وُجدت مساحة ─── */
  .toc-page {
    padding-bottom: 2mm;
  }

  .toc-list a {
    padding: 0.55rem 0.25rem;
  }

  /* ─── العناوين: منع الانفصال عن المحتوى ─── */
  .section-header {
    margin-bottom: 4mm;
    padding-bottom: 2.5mm;
    page-break-after: avoid;
    break-after: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .section-header h2 {
    font-size: 14pt;
    line-height: 1.3;
  }

  .section-desc {
    font-size: 8.5pt;
  }

  .sub-title {
    font-size: 10.5pt;
    margin: 3.5mm 0 2mm;
    page-break-after: avoid;
    break-after: avoid;
  }

  .intro-text {
    font-size: 9.5pt;
    margin-bottom: 3mm;
    line-height: 1.6;
  }

  /* ─── عناصر صغيرة: تبقى متماسكة ─── */
  .card,
  .law-block,
  .goal-item,
  .mini-card,
  .incentive-card,
  .kpi,
  .check-item,
  .vision-box,
  .alert-box,
  .conclusion-hero,
  .vision-future {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* ─── عناصر كبيرة: تُقسّم طبيعياً بين الصفحات ─── */
  .service-card,
  .phase,
  .step,
  .panel,
  .compliance-card,
  .benefit-col,
  .table-wrap,
  .data-table tr,
  .infra-layer {
    page-break-inside: auto;
    break-inside: auto;
  }

  .phase-header,
  .service-header,
  .benefit-header,
  .step-num {
    page-break-after: avoid;
    break-after: avoid;
  }

  .step h4,
  .panel h3,
  .phase-body h4 {
    page-break-after: avoid;
    break-after: avoid;
  }

  /* ─── تقليل المسافات للطباعة ─── */
  .card {
    padding: 3mm 4mm;
    margin-bottom: 2.5mm;
    gap: 3mm;
  }

  .card-body p,
  .law-desc {
    font-size: 9pt;
    line-height: 1.55;
  }

  .vision-box {
    padding: 4mm 5mm;
    margin: 3mm 0;
  }

  .goals-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5mm;
  }

  .goal-item {
    padding: 2.5mm 3mm;
  }

  .goal-item p {
    font-size: 8.5pt;
    line-height: 1.5;
  }

  .four-cols {
    grid-template-columns: repeat(4, 1fr);
    gap: 2mm;
    margin-bottom: 3mm;
  }

  .mini-card {
    padding: 2.5mm 2mm;
  }

  .mini-card h4 {
    font-size: 7.5pt;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5mm;
  }

  .service-header {
    padding: 2.5mm 3.5mm;
  }

  .service-header h3 {
    font-size: 9pt;
  }

  .service-header p {
    font-size: 7pt;
  }

  .service-card ul {
    padding: 2mm 3mm 2.5mm;
  }

  .service-card ul li {
    font-size: 8pt;
    line-height: 1.45;
    padding: 0.8mm 3mm 0.8mm 0;
  }

  .phases {
    gap: 2.5mm;
  }

  .phase-header {
    padding: 2.5mm 3.5mm;
  }

  .phase-header h3 {
    font-size: 9.5pt;
  }

  .phase-body {
    padding: 2.5mm 3.5mm;
  }

  .phase-body.two-col {
    grid-template-columns: 1fr 1fr;
    gap: 3mm;
  }

  .check-list li {
    font-size: 8.5pt;
    padding: 0.8mm 3.5mm 0.8mm 0;
    line-height: 1.45;
  }

  .check-list.two-col {
    grid-template-columns: 1fr 1fr;
    gap: 0 3mm;
  }

  .table-wrap {
    margin: 2.5mm 0;
  }

  .data-table {
    font-size: 8pt;
  }

  .data-table th,
  .data-table td {
    padding: 2mm 2.5mm;
  }

  .table-list li {
    font-size: 8pt;
    line-height: 1.4;
  }

  .incentive-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2mm;
  }

  .incentive-card {
    padding: 3mm 2mm;
  }

  .incentive-value {
    font-size: 16pt;
  }

  .alert-box {
    padding: 3mm 4mm;
    margin-bottom: 3mm;
    font-size: 9pt;
  }

  .steps-flow {
    gap: 2.5mm;
  }

  .step {
    padding: 3mm 12mm 3mm 3mm;
  }

  .step-num {
    width: 7mm;
    height: 7mm;
    font-size: 9pt;
    right: 3mm;
    top: 3mm;
  }

  .step h4 {
    font-size: 9.5pt;
    margin-bottom: 1.5mm;
  }

  .step ul li {
    font-size: 8pt;
    line-height: 1.4;
    padding: 0.5mm 3mm 0.5mm 0;
  }

  .two-panel {
    grid-template-columns: 1fr 1fr;
    gap: 2.5mm;
  }

  .panel {
    padding: 3mm;
  }

  .panel h3 {
    font-size: 9.5pt;
    margin-bottom: 2mm;
    padding-bottom: 1.5mm;
  }

  .infra-diagram {
    margin-bottom: 3mm;
  }

  .infra-layer {
    padding: 2.5mm 3mm;
  }

  .infra-items span {
    font-size: 7.5pt;
    padding: 1mm 2mm;
  }

  .infra-arrow {
    padding: 0.5mm;
    font-size: 9pt;
  }

  .compliance-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5mm;
  }

  .compliance-card {
    padding: 3mm;
  }

  .compliance-card h4 {
    font-size: 9pt;
  }

  .compliance-card ul li {
    font-size: 8pt;
    line-height: 1.4;
  }

  .benefits-three {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5mm;
    margin-bottom: 3mm;
  }

  .benefit-header {
    padding: 2mm 2.5mm;
    font-size: 8.5pt;
  }

  .benefit-col ul {
    padding: 2mm 2.5mm;
  }

  .benefit-col ul li {
    font-size: 7.5pt;
    line-height: 1.4;
  }

  .kpi-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5mm;
  }

  .kpi {
    padding: 2mm 1.5mm;
  }

  .kpi-val {
    font-size: 12pt;
  }

  .kpi-label {
    font-size: 7pt;
  }

  .kpi-desc {
    font-size: 6.5pt;
  }

  .conclusion-hero {
    padding: 4mm;
    margin-bottom: 3mm;
  }

  .conclusion-hero p {
    font-size: 11pt;
  }

  .conclusion-checks {
    grid-template-columns: 1fr 1fr;
    gap: 2mm;
    margin-bottom: 3mm;
  }

  .check-item {
    padding: 2mm 3mm;
    font-size: 8.5pt;
  }

  .id-cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5mm;
  }

  .id-card-version {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .id-card-visual {
    padding: 2mm;
    min-height: auto;
  }

  .id-card-mock {
    width: 48mm;
    height: 30mm;
    padding: 2mm;
  }

  .id-card-meta {
    padding: 2mm 2.5mm;
  }

  .id-card-meta h4 {
    font-size: 8.5pt;
  }

  .id-card-meta ul li {
    font-size: 7.5pt;
    line-height: 1.35;
  }

  .nfc-specs-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2mm;
    margin-bottom: 3mm;
  }

  .nfc-spec {
    padding: 2mm;
  }

  .nfc-spec p {
    font-size: 7pt;
  }

  .nfc-use-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2mm;
    margin-bottom: 3mm;
  }

  .nfc-use-item {
    padding: 2mm;
  }

  .nfc-use-item h4 {
    font-size: 8pt;
  }

  .nfc-use-item p {
    font-size: 7pt;
  }

  .id-lifecycle {
    padding: 2mm;
    margin-bottom: 2.5mm;
    flex-wrap: wrap;
  }

  .lifecycle-step {
    min-width: 22mm;
    padding: 1mm;
  }

  .lifecycle-step p {
    font-size: 6.5pt;
  }

  .lifecycle-arrow {
    font-size: 8pt;
  }

  .revenue-table {
    font-size: 8pt;
  }

  .revenue-table th,
  .revenue-table td {
    padding: 2mm 2.5mm;
  }

  .pitch-quote {
    padding: 3mm 4mm;
    margin: 3mm 0;
    font-size: 9.5pt;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .layer-item {
    padding: 2.5mm 3mm;
    gap: 2.5mm;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .layer-item h4 {
    font-size: 9.5pt;
  }

  .layer-item p,
  .layer-item ul li {
    font-size: 8pt;
  }

  .layer-num {
    width: 6mm;
    height: 6mm;
    font-size: 8pt;
  }

  .layer-stack {
    gap: 2mm;
  }

  .vision-future {
    padding: 3.5mm 4mm;
    margin-bottom: 3mm;
  }

  .closing {
    padding: 4mm 2mm;
  }

  .thanks {
    font-size: 10pt;
  }

  /* ─── قوائم: منع سطر وحيد معلّق ─── */
  p, li {
    orphans: 2;
    widows: 2;
  }

  ul, ol {
    page-break-inside: auto;
    break-inside: auto;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  /* ─── ألوان الخلفيات ─── */
  .cover-page,
  .service-header,
  .phase-header,
  .vision-box,
  .conclusion-hero,
  .benefit-header,
  .step-num,
  .toc-num,
  .goal-num,
  .law-badge,
  .data-table th,
  .phase.compact h4,
  .alert-box.warning {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .id-card-mock.standard,
  .id-card-mock.temporary,
  .id-card-mock.premium,
  .id-card-mock.supervisor,
  .id-card-mock.inspector,
  .id-phone-screen,
  .id-version-badge,
  .lc-num,
  .revenue-table th,
  .layer-num,
  .pitch-quote {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ═══════════════════════════════════════════
   PORTAL — محفظة المشاريع
   ═══════════════════════════════════════════ */
.portal-body {
  background: linear-gradient(160deg, #0a1628 0%, #1a2332 50%, #0d4f4f 100%);
  min-height: 100vh;
}

.portal-header {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  color: white;
}

.portal-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.portal-header p {
  opacity: 0.85;
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.portal-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.portal-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-lg);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

.portal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.portal-card-cover {
  padding: 2rem 1.75rem;
  color: white;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.portal-card-cover .pc-num {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.75;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.portal-card-cover h2 {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.35;
}

.portal-card-cover .pc-en {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 0.25rem;
  font-style: italic;
}

.portal-card-body {
  padding: 1.25rem 1.75rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portal-card-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.portal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
}

.portal-tag {
  padding: 0.2rem 0.6rem;
  background: var(--bg);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.portal-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: auto;
}

.pc-khidma .portal-card-cover { background: linear-gradient(135deg, #083838, #1a7373); }
.pc-khidma .portal-link { color: #0d4f4f; }

.pc-health .portal-card-cover { background: linear-gradient(135deg, #1a5276, #c0392b); }
.pc-health .portal-link { color: #1a5276; }

.pc-agri .portal-card-cover { background: linear-gradient(135deg, #145a32, #b7950b); }
.pc-agri .portal-link { color: #145a32; }

.pc-taxi .portal-card-cover { background: linear-gradient(135deg, #1a1a2e, #f39c12); }
.pc-taxi .portal-link { color: #d68910; }

.pc-pharma .portal-card-cover { background: linear-gradient(135deg, #512e5f, #2e86ab); }
.pc-pharma .portal-link { color: #512e5f; }

.nav-back {
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  opacity: 0.85;
  padding: 0.4rem 0.75rem;
  background: rgba(13, 79, 79, 0.07);
  border-radius: 8px;
  margin-left: 0;
  flex-shrink: 0;
}

.nav-inner > .nav-brand:not(.nav-back) {
  font-size: 1.05rem;
  flex-shrink: 0;
}

.footer-nav {
  margin-top: 0.5rem;
}

.footer-nav a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}

.footer-nav a:hover {
  text-decoration: underline;
}

/* Theme overrides per project */
.theme-health { --primary: #1a5276; --primary-light: #2e86ab; --primary-dark: #154360; --accent: #c0392b; }
.theme-agri { --primary: #145a32; --primary-light: #1e8449; --primary-dark: #0b5345; --accent: #b7950b; }
.theme-taxi { --primary: #1a1a2e; --primary-light: #2c3e50; --primary-dark: #0f0f1a; --accent: #f39c12; }
.theme-pharma { --primary: #512e5f; --primary-light: #7d3c98; --primary-dark: #4a235a; --accent: #2e86ab; }

.revenue-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 1rem 0; }
.revenue-table th, .revenue-table td { padding: 0.75rem 1rem; border: 1px solid var(--border); text-align: right; }
.revenue-table th { background: var(--primary); color: white; }
.revenue-table .total-row { background: rgba(13,79,79,0.06); font-weight: 700; }
.pitch-quote { padding: 1.5rem 2rem; border-right: 4px solid var(--accent); background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; font-size: 1.05rem; font-weight: 600; color: var(--primary-dark); line-height: 1.8; }
.layer-stack { display: flex; flex-direction: column; gap: 0.75rem; }
.layer-item { display: flex; gap: 1rem; padding: 1.25rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); border-right: 4px solid var(--primary); }
.layer-num { flex-shrink: 0; width: 2.5rem; height: 2.5rem; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; }
.layer-item h4 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 0.35rem; }
.layer-item p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }
.layer-item ul { list-style: none; margin-top: 0.5rem; }
.layer-item ul li { font-size: 0.85rem; color: var(--text-muted); padding: 0.2rem 1rem 0.2rem 0; position: relative; }
.layer-item ul li::before { content: '●'; position: absolute; right: 0; color: var(--primary-light); font-size: 0.5rem; top: 0.45rem; }
