/* Sona3 V6.0.3 — stability, users, lazy loading and medical print */
.v603-lazy-load-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0;padding:14px 16px;border:1px solid rgba(20,83,45,.16);border-radius:14px;background:linear-gradient(135deg,rgba(240,253,244,.96),rgba(255,255,255,.96));box-shadow:0 8px 22px rgba(15,23,42,.05)}
.v603-lazy-load-bar>div{display:flex;flex-direction:column;gap:3px}.v603-lazy-load-bar strong{font-size:14px}.v603-lazy-load-bar small{color:#64748b;line-height:1.6}
.v603-users-table-wrap{overflow:auto;border:1px solid #e2e8f0;border-radius:16px;background:#fff;box-shadow:0 8px 26px rgba(15,23,42,.05)}
.v603-users-table{width:100%;border-collapse:collapse;min-width:890px}.v603-users-table th,.v603-users-table td{padding:13px 14px;text-align:right;border-bottom:1px solid #eef2f7;vertical-align:middle}.v603-users-table th{background:#f8fafc;color:#334155;font-size:13px;position:sticky;top:0;z-index:1}.v603-users-table tr:last-child td{border-bottom:0}.v603-users-table td small{display:block;color:#64748b;margin-top:3px}.v603-role-badge,.v603-status{display:inline-flex;align-items:center;border-radius:999px;padding:5px 10px;font-weight:700;font-size:12px;white-space:nowrap}.v603-role-badge{background:#eef2ff;color:#3730a3}.v603-status.on{background:#dcfce7;color:#166534}.v603-status.off{background:#fee2e2;color:#991b1b}.v603-user-actions{display:flex;gap:7px;flex-wrap:wrap}.mini-warn{background:#fff7ed!important;color:#9a3412!important;border-color:#fed7aa!important}.mini-success{background:#ecfdf5!important;color:#047857!important;border-color:#a7f3d0!important}
.v603-modal-backdrop{position:fixed;inset:0;z-index:10050;background:rgba(15,23,42,.55);backdrop-filter:blur(4px);display:none;align-items:center;justify-content:center;padding:20px}.v603-modal-backdrop.open{display:flex}.v603-modal-card{position:relative;width:min(940px,96vw);max-height:88vh;overflow:auto;background:#fff;border-radius:20px;padding:24px;box-shadow:0 30px 70px rgba(15,23,42,.3)}.v603-modal-close{position:absolute;left:14px;top:12px;width:36px;height:36px;border:0;border-radius:50%;font-size:25px;background:#f1f5f9;cursor:pointer}.v603-modal-actions{display:flex;justify-content:flex-end;margin-top:18px}.v603-perm-view-group{border:1px solid #e2e8f0;border-radius:14px;padding:14px;margin-top:12px}.v603-perm-view-group h4{margin:0 0 10px;color:#0f172a}.v603-perm-view-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px}.v603-perm-state{padding:8px 10px;border-radius:10px;font-size:13px}.v603-perm-state.on{background:#ecfdf5;color:#166534;border:1px solid #bbf7d0}.v603-perm-state.off{background:#f8fafc;color:#64748b;border:1px solid #e2e8f0}.v603-modal-open{overflow:hidden}
.permission-auto-parent{opacity:1!important;filter:none!important;cursor:pointer!important}.permission-auto-parent::after{content:"سيُفعّل الأصل تلقائيًا";font-size:10px;color:#64748b;margin-inline-start:5px}.permission-dependent-disabled{opacity:1!important;pointer-events:auto!important}.permission-dependent-disabled input{cursor:pointer!important}
@media(max-width:700px){.v603-lazy-load-bar{align-items:stretch;flex-direction:column}.v603-lazy-load-bar .btn{width:100%}.v603-modal-card{padding:18px 14px}.v603-perm-view-grid{grid-template-columns:1fr}}

/* Medical request form */
.med-print-v603{direction:rtl;color:#111827;font-family:"Tahoma","Arial",sans-serif}.med-print-document{width:210mm;min-height:297mm;margin:0 auto;background:#fff;padding:12mm 13mm;box-sizing:border-box}.med-print-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:12px;border-bottom:2px solid #166534;margin-bottom:14px}.med-print-brand{display:flex;align-items:center;gap:11px}.med-print-mark{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#166534;color:#fff;font-size:24px;font-weight:900}.med-print-header h1{margin:0;color:#14532d;font-size:22px}.med-print-header p{margin:4px 0 0;color:#64748b;font-size:11px}.med-print-meta{display:flex;flex-direction:column;gap:4px;text-align:left;font-size:10px}.med-print-meta span{color:#475569}.med-form-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:12px}.med-form-summary>div{border:1px solid #dbe5df;border-radius:9px;padding:8px;background:#f8fffa}.med-form-summary span{display:block;color:#64748b;font-size:9px;margin-bottom:4px}.med-form-summary strong{font-size:12px;color:#14532d}.med-form-section{border:1px solid #d9e4dc;border-radius:10px;margin:0 0 10px;overflow:hidden;break-inside:avoid}.med-form-section h2{margin:0;padding:8px 10px;background:#eef8f1;color:#14532d;font-size:13px;display:flex;gap:8px;align-items:center}.med-form-section h2 span{display:grid;place-items:center;width:24px;height:24px;border-radius:7px;background:#166534;color:#fff;font-size:9px}.med-form-fields{display:grid;grid-template-columns:repeat(2,1fr);gap:0}.med-form-field{min-height:46px;padding:8px 10px;border-top:1px solid #edf2ef;border-inline-start:1px solid #edf2ef;box-sizing:border-box}.med-form-field.wide{grid-column:1/-1}.med-form-label{display:block;font-size:9px;color:#64748b;margin-bottom:5px}.med-form-field strong{font-size:11px;white-space:pre-wrap;line-height:1.55}.med-form-signatures{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:18px;break-inside:avoid}.med-form-signatures>div{height:70px;border:1px dashed #94a3b8;border-radius:9px;padding:8px}.med-form-signatures span{display:block;font-weight:700;font-size:10px;color:#334155}.med-form-signatures strong{display:block;text-align:center;margin-top:30px;font-size:9px;color:#94a3b8}.med-print-footer{display:flex;justify-content:space-between;border-top:1px solid #d9e4dc;margin-top:14px;padding-top:7px;color:#64748b;font-size:8px}
@media print{body>*:not(.med-print-root){display:none!important}.med-print-root{display:block!important;position:absolute;inset:0;background:#fff}.med-print-document{width:auto;min-height:auto;margin:0;padding:8mm 10mm}.med-print-v603 *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}@page{size:A4 portrait;margin:0}}
.v603-all-regions-check{margin:8px 0 10px;padding:9px 11px;border:1px solid #dbe5df;border-radius:10px;background:#f8fffa;width:max-content;max-width:100%}
