
/* OMID R4 V3 — isolated demo management readability improvements */
#opsModalBody .demo-card {
  padding: 20px !important;
  border: 1px solid #b9cad7 !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 5px 18px rgba(15, 42, 65, .07) !important;
}

#opsModalBody .demo-list {
  gap: 16px !important;
}

#opsModalBody .demo-card-head {
  gap: 12px !important;
  margin-bottom: 14px !important;
}

#opsModalBody .demo-card-head b {
  font-size: 17px !important;
  line-height: 1.9 !important;
  color: #102c43 !important;
  font-weight: 800 !important;
}

#opsModalBody .demo-card-head small {
  font-size: 13px !important;
  line-height: 1.8 !important;
  color: #465c6c !important;
}

#opsModalBody .demo-card-grid {
  gap: 10px !important;
}

#opsModalBody .demo-card-grid > * {
  padding: 13px !important;
  min-width: 0;
  background: #f0f5f9 !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  line-height: 1.9 !important;
  color: #153348 !important;
}

#opsModalBody .demo-card-grid small,
#opsModalBody .demo-card-grid span {
  font-size: 13px !important;
  line-height: 1.8 !important;
}

#opsModalBody .demo-actions {
  gap: 9px !important;
  margin-top: 14px !important;
}

#opsModalBody .demo-actions button {
  min-height: 42px !important;
  padding: 10px 12px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.6 !important;
  white-space: normal !important;
  cursor: pointer;
}

#opsModalBody .demo-form label {
  font-size: 14px !important;
  line-height: 1.8 !important;
  color: #17364b !important;
}

#opsModalBody .demo-form input,
#opsModalBody .demo-form select,
#opsModalBody .demo-form textarea {
  min-height: 42px !important;
  font-size: 15px !important;
  color: #122e42 !important;
}

#opsModalBody .demo-card,
#opsModalBody .demo-form,
#opsModalBody .demo-issue {
  direction: rtl;
  font-family: Tahoma, "Segoe UI", sans-serif !important;
}

@media (max-width: 600px) {
  #opsModalBody .demo-card {
    padding: 14px !important;
  }
  #opsModalBody .demo-actions button {
    font-size: 13px !important;
  }
}

/* V3_MODAL_READABILITY_V2 */
@media (min-width: 800px) {
  #opsModal {
    width: min(94vw, 1000px) !important;
    max-width: 1000px !important;
  }

  #opsModalBody {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }
}

#opsModalBody .demo-card-grid > * {
  font-size: 15px !important;
  line-height: 1.9 !important;
}

#opsModalBody .demo-card-grid b,
#opsModalBody .demo-card-grid strong,
#opsModalBody .demo-card-grid small {
  font-size: 15px !important;
  line-height: 1.9 !important;
  overflow-wrap: anywhere;
}

#opsModalBody .demo-card-head b {
  font-size: 18px !important;
}

#opsModalBody .demo-actions button {
  font-size: 15px !important;
  min-height: 48px !important;
}

/* V3_MODAL_WIDTH_FIX */
@media (min-width: 900px) {
  #opsModal {
    width: min(92vw, 960px) !important;
    max-width: 960px !important;
  }

  #opsModal .ops-modal-content,
  #opsModal .modal-content,
  #opsModal .modal-panel,
  #opsModal > div {
    width: 100% !important;
    max-width: 960px !important;
    box-sizing: border-box !important;
  }

  #opsModalBody {
    width: 100% !important;
    max-width: none !important;
  }
}

/* V3_DASHBOARD_READABILITY */

/* Main operations cards — excludes the demo modal */
body .ops-result h3,
body .ops-result h4,
body .ops-card h3,
body .ops-card h4 {
  font-size: 17px !important;
  line-height: 1.8 !important;
}

body .ops-result p,
body .ops-result small,
body .ops-card p,
body .ops-card small {
  font-size: 14px !important;
  line-height: 1.9 !important;
}

body .ops-result button,
body .ops-card button {
  font-size: 14px !important;
  min-height: 38px;
}

body .ops-result .badge,
body .ops-card .badge {
  font-size: 13px !important;
}

/* V3 Module Picker - Readability */
#demoModuleChoices {
  gap: 12px;
}

#demoModuleChoices > label {
  background: #193650 !important;
  border: 1px solid #52708b !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.8 !important;
  padding: 14px 16px !important;
  min-height: 58px !important;
  border-radius: 14px !important;
  opacity: 1 !important;
}

#demoModuleChoices > label:has(input:checked) {
  background: #29475c !important;
  border: 2px solid #e7bf65 !important;
  color: #fff8e7 !important;
  box-shadow: inset 0 0 0 1px #b99752;
}

#demoModuleChoices input[type="checkbox"] {
  width: 22px !important;
  height: 22px !important;
  flex: 0 0 22px !important;
  accent-color: #e7bf65;
}

#demoModulePicker > strong {
  color: #f2ce78 !important;
  font-size: 17px !important;
  font-weight: 700 !important;
}

/* V3 MODULE TEXT VISIBILITY FIX */
#demoModulePicker #demoModuleChoices > label,
#demoModulePicker #demoModuleChoices > label *,
#demoModulePicker #demoModuleChoices > label::before,
#demoModulePicker #demoModuleChoices > label::after {
  color: #ffffff !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

#demoModulePicker #demoModuleChoices > label {
  -webkit-text-fill-color: #ffffff !important;
  text-align: right !important;
  direction: rtl !important;
}

#demoModulePicker #demoModuleChoices > label input[type="checkbox"] {
  accent-color: #e7bf65 !important;
}

/* R4_DEMO_ISSUE_PREMIUM */
#opsModalBody .demo-issue:not([hidden]){display:flex!important;flex-direction:column;gap:14px;padding:22px!important;margin-top:20px;border:1px solid #c9a45b!important;border-radius:18px!important;background:linear-gradient(135deg,#10283e,#193c56)!important;color:#fff!important;box-shadow:0 12px 30px #10283e25;direction:rtl}
#opsModalBody .demo-issue b{color:#f0cf86!important;font-size:19px!important}
#opsModalBody .demo-issue span,#opsModalBody .demo-issue small{color:#e0e9f1!important;line-height:1.9}
#opsModalBody .demo-link-row{display:flex!important;flex-wrap:wrap;align-items:center;gap:10px;width:100%}
#opsModalBody #demoIssueLink{flex:1 1 260px;min-width:0;height:44px;padding:10px;border:1px solid #8ca2b5;border-radius:10px;background:#fff;color:#173149;direction:ltr;text-align:left}
#opsModalBody .demo-issue button{min-height:44px!important;padding:10px 18px!important;border-radius:10px!important;font-weight:700!important;cursor:pointer}
#opsModalBody #demoOpenLink{background:#d7ad60!important;color:#142b40!important;border:0!important}
#opsModalBody #demoCopyLink{background:#fff!important;color:#173149!important;border:1px solid #d7ad60!important}
#opsModalBody #demoCopyMessage{align-self:flex-start;background:#d7ad60!important;color:#142b40!important;border:0!important}
@media(max-width:600px){#opsModalBody .demo-issue{padding:15px!important}#opsModalBody .demo-link-row button{flex:1}}

/* UI_V4: typography, full viewport overlay, responsive sheets */
:root{--muted:#4e6578;--line:#cbd8e2}
body{font-size:15px;line-height:1.8}
.panel-head{gap:12px;flex-wrap:wrap}
.hero-copy>p{max-width:480px;color:#d7e6ef}
.metric>small,.ticket-main small,.app-info small,.activity-item small,.ops-card small,.ops-result small,.form-help,.privacy-note{color:#4e6578}
.app-info small{font:13px/1.8 Tahoma,Arial,sans-serif;flex-wrap:wrap}
.app-info strong,.ticket-main strong{white-space:normal;line-height:1.8}
.app-row{grid-template-columns:54px minmax(0,1fr) auto;min-height:100px}
.open-app{width:auto;min-width:106px;min-height:44px;padding:9px 12px}
.metric{min-height:155px}.metric>span{line-height:1.7}
button.primary,button.secondary,button.danger,.text-btn,.ticket-open,.faq-chip,.pwa-install button{min-height:44px}
button:disabled{cursor:not-allowed;opacity:.55}
.close{width:44px;height:44px;flex:0 0 44px;color:#25465e}
.nav-btn span{font-size:12px;white-space:nowrap}
.ops-grid{gap:16px}.ops-card{padding:20px;min-height:180px}
.ops-card b{font-size:17px;line-height:1.7}.ops-result b{font-size:15px}
.ops-search input,.form input,.form select,.form textarea{font-size:16px}
body:has(.modal.open) .omid-central-status{visibility:hidden}
.modal{align-items:center;padding:24px;background:rgba(4,19,32,.64);backdrop-filter:blur(3px)}
#opsModal{width:100%!important;max-width:none!important;margin:0!important}
.sheet,#opsModal>.sheet{width:min(100%,860px)!important;max-width:860px!important;max-height:calc(100dvh - 48px);padding:24px;border-radius:22px;overscroll-behavior:contain}
.sheet-head{position:sticky;top:-24px;z-index:3;padding:12px 0;margin-top:-12px;background:#fff;border-bottom:1px solid #dce5ed}
.sheet-head h2{font-size:21px;line-height:1.7}
.ops-modal-info{gap:14px}.ops-modal-info>div{padding:18px 20px;border-color:#cbd8e2;background:#f5f8fb}
.ops-modal-info b{font-size:16px;color:#12344e}.ops-modal-info small{font-size:15px;line-height:2;color:#405b70;margin-top:8px}
#opsModalBody .demo-head{flex-wrap:wrap;gap:12px}
#opsModalBody .demo-card-head{flex-wrap:wrap}
#opsModalBody .demo-card .pill{font-size:13px;line-height:1.7;min-height:32px}
#opsModalBody .demo-card-grid b{font-size:15px!important;line-height:1.8}
#opsModalBody .demo-card-grid small{color:#50687b!important}
#opsModalBody .demo-actions button{min-height:48px!important}
#opsModalBody .demo-actions button:disabled{opacity:.45}
#opsModalBody .demo-form input,#opsModalBody .demo-form select{font-size:16px!important}
#opsModalBody #demoModulePicker>strong{color:#5b4516!important}
:focus-visible{outline:3px solid #2176ad!important;outline-offset:3px}
@media(max-width:699px){
.app-header{grid-template-columns:110px minmax(0,1fr) 42px;height:auto;min-height:92px;gap:6px}
.header-title strong{font-size:16px}.header-title small{font-size:11px;flex-wrap:wrap;justify-content:center}
.user-chip small{font-size:11px;white-space:normal}.hero-copy{width:100%}.hero{padding:24px 20px}
.ops-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.ops-grid{grid-template-columns:1fr}.ops-stage{grid-template-columns:repeat(2,minmax(0,1fr))}
.modal{padding:12px}.sheet,#opsModal>.sheet{max-height:calc(100dvh - 24px);padding:18px;border-radius:18px}
.sheet-head{top:-18px}.sheet-head h2{font-size:19px}.ops-modal-info>div{padding:15px}
.app-row{grid-template-columns:46px minmax(0,1fr)}.app-mark{width:44px;height:44px}.open-app{grid-column:2;justify-self:start}
.bottom-nav{left:8px;right:8px;padding-inline:4px}.nav-btn span{font-size:11px}
.sheet,.panel,.ops-card{overflow-wrap:anywhere}
#opsModalBody .demo-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))}
#opsModalBody .demo-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:360px){#opsModalBody .demo-card-grid{grid-template-columns:1fr!important}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}
