/* أنماط نظام إدارة العيادات والمجمعات الطبية الذكي ClinicPro */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&family=Cairo:wght@400;600;700;800;900&display=swap');

:root {
  --font-arabic: 'Tajawal', 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --primary-50: #ecfdf5;
  --primary-100: #d1fae5;
  --primary-500: #10b981;
  --primary-600: #059669;
  --primary-700: #047857;
  --accent-cyan: #06b6d4;
  --accent-blue: #2563eb;
  --surface-bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
}

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

body {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
  background-color: var(--surface-bg);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Glassmorphism & UI Accents */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.85);
}

.medical-gradient {
  background: linear-gradient(135deg, #059669 0%, #0d9488 50%, #0284c7 100%);
}

.medical-header-gradient {
  background: linear-gradient(90deg, #064e3b 0%, #065f46 50%, #047857 100%);
}

.subtle-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.775rem;
  font-weight: 600;
}

/* Pulse animation for critical alerts & waiting urgency */
@keyframes urgent-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

.badge-urgent-pulse {
  animation: urgent-pulse 1.8s infinite;
}

/* Barcode visual styling simulation */
.barcode-visual {
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 3px;
  background: #fff;
  padding: 6px 12px;
  display: inline-block;
  border: 1px dashed #94a3b8;
  border-radius: 4px;
}

.barcode-lines {
  height: 36px;
  background-image: repeating-linear-gradient(
    90deg,
    #000 0px,
    #000 2px,
    transparent 2px,
    transparent 4px,
    #000 4px,
    #000 7px,
    transparent 7px,
    transparent 9px,
    #000 9px,
    #000 10px,
    transparent 10px,
    transparent 13px
  );
  width: 100%;
}

/* Modal Backdrops & Animation */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn 0.15s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* --- الختم الرسمي الدائري الطبي والتوقيع الإلكتروني --- */
.medical-official-stamp {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 125px;
  height: 125px;
  border-radius: 50%;
  border: 3px solid #1e3a8a;
  outline: 2px dashed #1e3a8a;
  outline-offset: -6px;
  color: #1e3a8a;
  text-align: center;
  transform: rotate(-8deg);
  user-select: none;
  background: rgba(30, 58, 138, 0.03);
  mix-blend-mode: multiply;
  box-shadow: inset 0 0 10px rgba(30, 58, 138, 0.08);
}

.medical-official-stamp::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, transparent 65%, rgba(30, 58, 138, 0.05) 100%);
}

.signature-drawing-canvas {
  touch-action: none;
  cursor: crosshair;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
}

/* Rx Logo styling for prescription header */
.rx-symbol {
  font-family: 'Times New Roman', serif;
  font-style: italic;
  font-weight: bold;
  font-size: 2.2rem;
  line-height: 1;
  color: #047857;
}

/* --- أنماط الطباعة المخصصة (Print Stylesheets) --- */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }
  
  .no-print,
  #app-sidebar,
  #app-header,
  #app-mobile-nav,
  #toast-container,
  button:not(.allow-print) {
    display: none !important;
  }

  .printable-prescription-area,
  .printable-invoice-area,
  .printable-report-area {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    margin: 0 !important;
    padding: 8mm 10mm !important;
    background: white !important;
    box-shadow: none !important;
  }

  .print-page-break {
    page-break-after: always;
  }

  .thermal-receipt-print {
    width: 80mm !important;
    padding: 3mm !important;
    font-size: 10pt;
    margin: 0 auto;
    page-break-inside: avoid;
  }
}

