/* ---- source style block #ayanAuthGateStyle ---- */
body.auth-pending .ayan-system-shell, body.auth-pending .ops-shell, body.auth-pending #ayanSystemSelector { display: none !important; }

/* ---- source style block #ayanRouteGateStyle ---- */
/* إخفاء كل الأنظمة لحظة الدخول حتى يحدد الراوتر النظام المسموح للمستخدم */
html.ayan-routing .ayan-system-shell,
html.ayan-routing #operationsView{visibility:hidden!important}

/* ---- source style block ---- */
#ayanSystemSelector{
  position:fixed;
  inset:0;
  z-index:99999;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:
    radial-gradient(circle at top right,rgba(59,130,246,.10),transparent 35%),
    radial-gradient(circle at bottom left,rgba(16,185,129,.08),transparent 35%),
    #f4f6f9;
}
#ayanSystemSelector.active{display:flex}
.ayan-selector-shell{
  width:min(1050px,100%);
  margin:auto;
  position:relative;
  z-index:1;
}
.ayan-system-head{
  text-align:center;
  margin-bottom:28px;
}
.ayan-system-head h1{
  margin:0;
  font-size:34px;
  color:#111827;
}
.ayan-system-head p{
  margin:9px 0 0;
  color:#6b7280;
  font-size:14px;
}
.ayan-system-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
}
.ayan-system-card{
  border:1px solid #e5e7eb;
  border-radius:24px;
  background:#fff;
  padding:28px;
  box-shadow:0 16px 40px rgba(17,24,39,.08);
  cursor:pointer;
  transition:.18s ease;
  text-align:right;
}
.ayan-system-card:hover{
  transform:translateY(-3px);
  box-shadow:0 22px 55px rgba(17,24,39,.13);
}
.ayan-system-icon{
  width:58px;
  height:58px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  background:#f3f4f6;
  margin-bottom:18px;
}
.ayan-system-card h2{
  margin:0 0 8px;
  font-size:22px;
  color:#111827;
}
.ayan-system-card p{
  margin:0;
  color:#6b7280;
  line-height:1.8;
  font-size:13px;
}
.ayan-system-enter{
  margin-top:22px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:12px;
  background:#111827;
  color:#fff;
  font-weight:700;
  font-size:13px;
}
.ayan-switcher{
  position:fixed;
  top:14px;
  left:14px;
  z-index:9998;
  border:1px solid #d1d5db;
  background:#fff;
  color:#111827;
  padding:9px 12px;
  border-radius:11px;
  font-size:12px;
  font-weight:700;
  box-shadow:0 8px 24px rgba(17,24,39,.08);
  display:none;
}
.ayan-switcher.show{display:block}
@media(max-width:720px){
  .ayan-system-grid{grid-template-columns:1fr}
  .ayan-system-head h1{font-size:26px}
  .ayan-system-card{padding:22px}
}

/* ---- source style block ---- */
    #operationsView{
      min-height:100vh;
      background:#f4f6f9;
      color:#111827;
      direction:rtl;
      font-family:inherit;
    }

    .ops-shell{
      min-height:100vh;
      display:grid;
      grid-template-columns:260px minmax(0,1fr);
    }

    .ops-sidebar{
      background:#0f172a;
      color:#fff;
      padding:20px 16px;
      min-height:100vh;
      position:sticky;
      top:0;
    }

    .ops-brand{
      display:flex;
      align-items:center;
      gap:12px;
      margin-bottom:28px;
      padding:0 6px;
    }

    .ops-logo{
      width:48px;
      height:48px;
      display:flex;
      align-items:center;
      justify-content:center;
    }

    .ops-logo img{
      width:100%;
      height:100%;
      object-fit:contain;
      filter:brightness(0) invert(1);
    }

    .ops-brand strong{
      display:block;
      font-size:16px;
    }

    .ops-brand small{
      display:block;
      margin-top:3px;
      color:#94a3b8;
      font-size:11px;
    }

    .ops-nav{
      display:flex;
      flex-direction:column;
      gap:7px;
    }

    .ops-nav button{
      width:100%;
      border:0;
      background:transparent;
      color:#cbd5e1;
      padding:12px 13px;
      border-radius:11px;
      text-align:right;
      cursor:pointer;
      font:inherit;
      font-weight:700;
    }

    .ops-nav button:hover,
    .ops-nav button.active{
      background:#1e293b;
      color:#fff;
    }

    .ops-main{
      min-width:0;
    }

    .ops-header{
      background:#fff;
      border-bottom:1px solid #e5e7eb;
      padding:15px 22px;
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:14px;
      position:sticky;
      top:0;
      z-index:50;
    }

    .ops-header-title strong{
      display:block;
      font-size:18px;
    }

    .ops-header-title small{
      display:block;
      color:#64748b;
      margin-top:3px;
    }

    .ops-switch-btn{
      border:1px solid #d1d5db;
      background:#fff;
      color:#111827;
      padding:9px 13px;
      border-radius:10px;
      font-weight:800;
      cursor:pointer;
    }

    .ops-content{
      padding:22px;
    }

    .ops-section{
      display:none;
    }

    .ops-section.active{
      display:block;
    }

    .ops-hero{
      background:#fff;
      border:1px solid #e5e7eb;
      border-radius:18px;
      padding:22px;
      margin-bottom:18px;
    }

    .ops-hero h1{
      margin:0 0 8px;
      font-size:24px;
    }

    .ops-hero p{
      margin:0;
      color:#64748b;
      line-height:1.8;
    }

    .ops-kpis{
      display:grid;
      grid-template-columns:repeat(4,minmax(0,1fr));
      gap:14px;
    }

    .ops-card{
      background:#fff;
      border:1px solid #e5e7eb;
      border-radius:16px;
      padding:18px;
    }

    #operationsView [hidden]{
      display:none !important;
    }

    .ops-card span{
      display:block;
      color:#64748b;
      font-size:12px;
      margin-bottom:8px;
    }

    .ops-card strong{
      font-size:26px;
    }

    .ops-empty{
      background:#fff;
      border:1px dashed #cbd5e1;
      border-radius:16px;
      padding:34px 20px;
      text-align:center;
      color:#64748b;
    }

    .ops-empty strong{
      display:block;
      color:#111827;
      margin-bottom:6px;
      font-size:17px;
    }

    @media(max-width:900px){
      .ops-shell{
        grid-template-columns:1fr;
      }

      .ops-sidebar{
        min-height:auto;
        position:relative;
      }

      .ops-nav{
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
      }

      .ops-kpis{
        grid-template-columns:repeat(2,minmax(0,1fr));
      }
    }

    @media(max-width:520px){
      .ops-content{
        padding:14px;
      }

      .ops-header{
        padding:12px 14px;
      }

      .ops-kpis{
        grid-template-columns:1fr;
      }

      .ops-nav{
        grid-template-columns:1fr 1fr;
      }
    }
  

    /* =====================================================
       AYAN OPERATIONS THEME V2
       ===================================================== */

    #operationsView{
      --ops-bg:#f4f6f9;
      --ops-surface:#ffffff;
      --ops-surface-2:#f8fafc;
      --ops-text:#111827;
      --ops-muted:#64748b;
      --ops-border:#e2e8f0;
      --ops-sidebar:#0f172a;
      --ops-sidebar-hover:#1e293b;
      --ops-sidebar-text:#cbd5e1;
      --ops-input:#ffffff;
      --ops-shadow:0 16px 40px rgba(15,23,42,.08);

      background:var(--ops-bg) !important;
      color:var(--ops-text) !important;
      transition:background .2s ease,color .2s ease;
    }

    #operationsView[data-theme="dark"]{
      --ops-bg:#0b1120;
      --ops-surface:#111827;
      --ops-surface-2:#182235;
      --ops-text:#f8fafc;
      --ops-muted:#a8b3c5;
      --ops-border:#293548;
      --ops-sidebar:#070d19;
      --ops-sidebar-hover:#1b2638;
      --ops-sidebar-text:#d7e0ec;
      --ops-input:#0f172a;
      --ops-shadow:0 18px 50px rgba(0,0,0,.28);
    }

    #operationsView .ops-sidebar{
      background:var(--ops-sidebar) !important;
    }

    #operationsView .ops-nav button{
      color:var(--ops-sidebar-text) !important;
    }

    #operationsView .ops-nav button:hover,
    #operationsView .ops-nav button.active{
      background:var(--ops-sidebar-hover) !important;
      color:#fff !important;
    }

    #operationsView .ops-header,
    #operationsView .ops-hero,
    #operationsView .ops-card,
    #operationsView .ops-empty,
    #operationsView .ops-data-card{
      background:var(--ops-surface) !important;
      color:var(--ops-text) !important;
      border-color:var(--ops-border) !important;
    }

    #operationsView .ops-header{
      box-shadow:0 1px 0 var(--ops-border);
    }

    #operationsView .ops-header-title small,
    #operationsView .ops-hero p,
    #operationsView .ops-card span,
    #operationsView .ops-empty,
    #operationsView .ops-subtitle{
      color:var(--ops-muted) !important;
    }

    #operationsView .ops-empty strong{
      color:var(--ops-text) !important;
    }

    #operationsView .ops-switch-btn,
    #operationsView .ops-theme-btn,
    #operationsView .ops-secondary-btn{
      background:var(--ops-surface) !important;
      color:var(--ops-text) !important;
      border:1px solid var(--ops-border) !important;
    }

    #operationsView .ops-header-actions{
      display:flex;
      align-items:center;
      gap:9px;
      flex-wrap:wrap;
    }

    #operationsView .ops-theme-btn{
      padding:9px 13px;
      border-radius:10px;
      font:inherit;
      font-weight:800;
      cursor:pointer;
    }

    #operationsView .ops-module-head{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:14px;
      flex-wrap:wrap;
      margin-bottom:18px;
    }

    #operationsView .ops-module-head h2{
      margin:0 0 5px;
      color:var(--ops-text);
    }

    #operationsView .ops-subtitle{
      font-size:13px;
    }

    #operationsView .ops-primary-btn{
      border:0;
      background:#0f766e;
      color:#fff;
      padding:10px 16px;
      border-radius:10px;
      font:inherit;
      font-weight:800;
      cursor:pointer;
      display:inline-flex;
      align-items:center;
      justify-content:center;
      gap:6px;
    }

    #operationsView .ops-primary-btn:disabled{
      opacity:.6;
      cursor:not-allowed;
    }

    #operationsView .ops-data-card{
      border:1px solid var(--ops-border);
      border-radius:16px;
      overflow:hidden;
      box-shadow:var(--ops-shadow);
    }

    #operationsView .ops-table-wrap{
      overflow:auto;
    }

    #operationsView .ops-table{
      width:100%;
      min-width:850px;
      border-collapse:collapse;
      color:var(--ops-text);
      background:var(--ops-surface);
    }

    #operationsView .ops-table thead{
      background:var(--ops-surface-2);
    }

    #operationsView .ops-table th{
      padding:12px;
      text-align:right;
      white-space:nowrap;
      color:var(--ops-text);
    }

    #operationsView .ops-table td{
      padding:12px;
      border-top:1px solid var(--ops-border);
      color:var(--ops-text);
      vertical-align:top;
    }

    #operationsView .ops-table .ops-muted{
      color:var(--ops-muted) !important;
      font-size:12px;
      margin-top:4px;
    }

    #operationsView .ops-status{
      display:inline-flex;
      align-items:center;
      padding:5px 9px;
      border-radius:999px;
      background:var(--ops-surface-2);
      border:1px solid var(--ops-border);
      font-size:12px;
      font-weight:800;
      white-space:nowrap;
    }

    .ops-modal-backdrop{
      display:none;
      position:fixed;
      inset:0;
      background:rgba(2,6,23,.66);
      z-index:100500;
      align-items:center;
      justify-content:center;
      padding:18px;
    }

    .ops-modal-box{
      width:min(620px,100%);
      max-height:92vh;
      overflow:auto;
      background:#fff;
      color:#111827;
      border-radius:18px;
      padding:22px;
      box-shadow:0 25px 80px rgba(0,0,0,.28);
    }

    #operationsView[data-theme="dark"] ~ .ops-modal-backdrop .ops-modal-box{
      background:#111827;
      color:#f8fafc;
    }

    .ops-modal-head{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      margin-bottom:18px;
    }

    .ops-modal-head h3{
      margin:0;
    }

    .ops-modal-close{
      border:1px solid #dbe2ea;
      background:#f8fafc;
      color:#111827;
      border-radius:9px;
      padding:8px 11px;
      cursor:pointer;
      font-weight:800;
    }

    #operationsView[data-theme="dark"] ~ .ops-modal-backdrop .ops-modal-close{
      background:#182235;
      color:#f8fafc;
      border-color:#293548;
    }

    .ops-form-grid{
      display:grid;
      gap:14px;
    }

    .ops-form-grid-2{
      display:grid;
      grid-template-columns:repeat(2,minmax(0,1fr));
      gap:12px;
    }

    .ops-field-title{
      font-weight:800;
      margin-bottom:6px;
    }

    .ops-field,
    .ops-modal-box input,
    .ops-modal-box select,
    .ops-modal-box textarea{
      width:100%;
      box-sizing:border-box;
      padding:11px;
      border:1px solid #cbd5e1;
      border-radius:9px;
      background:#fff;
      color:#111827;
      font:inherit;
    }

    #operationsView[data-theme="dark"] ~ .ops-modal-backdrop input,
    #operationsView[data-theme="dark"] ~ .ops-modal-backdrop select,
    #operationsView[data-theme="dark"] ~ .ops-modal-backdrop textarea{
      background:#0f172a;
      color:#f8fafc;
      border-color:#334155;
    }

    #operationsView[data-theme="dark"] ~ #opsTaskModal > div{
      background:#111827 !important;
      color:#f8fafc !important;
    }

    #operationsView[data-theme="dark"] ~ #opsTaskModal input,
    #operationsView[data-theme="dark"] ~ #opsTaskModal textarea,
    #operationsView[data-theme="dark"] ~ #opsTaskModal select{
      background:#0f172a !important;
      color:#f8fafc !important;
      border-color:#334155 !important;
    }

    #operationsView[data-theme="dark"] #ops-tasks > div:nth-child(2),
    #operationsView[data-theme="dark"] #ops-tasks table{
      background:var(--ops-surface) !important;
      color:var(--ops-text) !important;
      border-color:var(--ops-border) !important;
    }

    #operationsView[data-theme="dark"] #ops-tasks thead{
      background:var(--ops-surface-2) !important;
    }

    #operationsView[data-theme="dark"] #ops-tasks th,
    #operationsView[data-theme="dark"] #ops-tasks td,
    #operationsView[data-theme="dark"] #ops-tasks h2{
      color:var(--ops-text) !important;
      border-color:var(--ops-border) !important;
    }

    @media(max-width:650px){
      #operationsView .ops-header{
        align-items:flex-start;
      }

      #operationsView .ops-header-actions{
        justify-content:flex-start;
      }

      #operationsView .ops-form-grid-2{
        grid-template-columns:1fr;
      }

      #operationsView .ops-module-head{
        align-items:stretch;
      }

      #operationsView .ops-primary-btn{
        width:100%;
      }
    }



    /* =====================================================
       AYAN OPERATIONS UIUX V3
       ===================================================== */

    #operationsView{
      --ops-radius:14px;
      --ops-radius-lg:18px;
      --ops-danger:#b91c1c;
      --ops-success:#047857;
      --ops-primary:#2563eb;
      --ops-primary-hover:#1d4ed8;
    }

    #operationsView button,
    .ops-modal-backdrop button{
      -webkit-tap-highlight-color:transparent;
    }

    #operationsView .ops-primary-btn{
      background:var(--ops-primary) !important;
      color:#fff !important;
      border:none !important;
      min-height:44px;
      transition:transform .15s ease,opacity .15s ease,background .15s ease;
    }

    #operationsView .ops-primary-btn:hover{
      background:var(--ops-primary-hover) !important;
    }

    #operationsView .ops-primary-btn:active{
      transform:scale(.985);
    }

    #operationsView .ops-switch-btn,
    #operationsView .ops-theme-btn,
    #operationsView .ops-secondary-btn{
      min-height:42px;
      opacity:1 !important;
      font-weight:800 !important;
    }

    #operationsView[data-theme="light"] .ops-switch-btn,
    #operationsView[data-theme="light"] .ops-theme-btn,
    #operationsView[data-theme="light"] .ops-secondary-btn{
      background:#fff !important;
      color:#111827 !important;
      border:1px solid #cbd5e1 !important;
    }

    #operationsView[data-theme="dark"] .ops-switch-btn,
    #operationsView[data-theme="dark"] .ops-theme-btn,
    #operationsView[data-theme="dark"] .ops-secondary-btn{
      background:#172033 !important;
      color:#f8fafc !important;
      border:1px solid #334155 !important;
    }

    .ops-modal-backdrop{
      backdrop-filter:blur(2px);
      -webkit-backdrop-filter:blur(2px);
    }

    .ops-modal-box{
      border:1px solid #e2e8f0;
    }

    .ops-modal-close{
      min-height:40px;
      min-width:64px;
      opacity:1 !important;
      visibility:visible !important;
      font-size:14px;
      line-height:1;
    }

    .ops-modal-backdrop .ops-modal-close{
      background:#f1f5f9 !important;
      color:#111827 !important;
      border:1px solid #cbd5e1 !important;
    }

    #operationsView[data-theme="dark"] ~ .ops-modal-backdrop .ops-modal-close{
      background:#1e293b !important;
      color:#f8fafc !important;
      border-color:#475569 !important;
    }

    .ops-modal-box label{
      display:block;
      color:#111827;
    }

    #operationsView[data-theme="dark"] ~ .ops-modal-backdrop .ops-modal-box label{
      color:#f8fafc;
    }

    .ops-field-title{
      color:inherit;
      font-size:14px;
      line-height:1.4;
    }

    .ops-modal-box input,
    .ops-modal-box select,
    .ops-modal-box textarea{
      min-height:46px;
      outline:none;
      transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
    }

    .ops-modal-box textarea{
      min-height:110px;
    }

    .ops-modal-box input:focus,
    .ops-modal-box select:focus,
    .ops-modal-box textarea:focus{
      border-color:#2563eb !important;
      box-shadow:0 0 0 3px rgba(37,99,235,.14);
    }

    .ops-modal-box select{
      cursor:pointer;
    }

    .ops-modal-box input::placeholder,
    .ops-modal-box textarea::placeholder{
      color:#94a3b8;
      opacity:1;
    }

    #operationsView[data-theme="dark"] ~ .ops-modal-backdrop input::placeholder,
    #operationsView[data-theme="dark"] ~ .ops-modal-backdrop textarea::placeholder{
      color:#64748b;
    }

    #operationsView .ops-module-head{
      background:var(--ops-surface);
      border:1px solid var(--ops-border);
      border-radius:var(--ops-radius-lg);
      padding:16px 18px;
      box-shadow:var(--ops-shadow);
    }

    #operationsView .ops-data-card{
      box-shadow:none;
    }

    #operationsView .ops-table th{
      font-size:13px;
    }

    #operationsView .ops-table td{
      font-size:13px;
      line-height:1.6;
    }

    #operationsView .ops-table tbody tr:hover{
      background:var(--ops-surface-2);
    }

    #operationsView .ops-status{
      min-height:28px;
    }

    #operationsView .ops-header{
      min-height:72px;
      box-sizing:border-box;
    }

    #operationsView .ops-header-actions button{
      white-space:nowrap;
    }

    #operationsView[data-theme="dark"] .ops-header-title strong,
    #operationsView[data-theme="dark"] .ops-header-title small,
    #operationsView[data-theme="dark"] h1,
    #operationsView[data-theme="dark"] h2,
    #operationsView[data-theme="dark"] h3,
    #operationsView[data-theme="dark"] strong{
      color:var(--ops-text);
    }

    #operationsView[data-theme="light"] .ops-header-title strong,
    #operationsView[data-theme="light"] h1,
    #operationsView[data-theme="light"] h2,
    #operationsView[data-theme="light"] h3{
      color:#111827 !important;
    }

    #operationsView[data-theme="light"] .ops-subtitle,
    #operationsView[data-theme="light"] .ops-muted,
    #operationsView[data-theme="light"] .ops-header-title small{
      color:#64748b !important;
    }

    @media(max-width:900px){

      #operationsView .ops-shell{
        display:block;
      }

      #operationsView .ops-sidebar{
        position:relative !important;
        min-height:auto !important;
        padding:14px 12px !important;
      }

      #operationsView .ops-brand{
        margin-bottom:14px !important;
      }

      #operationsView .ops-nav{
        display:flex !important;
        flex-direction:row !important;
        overflow-x:auto;
        gap:8px;
        padding-bottom:4px;
        scrollbar-width:thin;
      }

      #operationsView .ops-nav button{
        width:auto !important;
        min-width:max-content;
        flex:0 0 auto;
        text-align:center;
        padding:10px 12px !important;
      }

      #operationsView .ops-header{
        position:relative !important;
        top:auto !important;
        padding:12px 14px !important;
        min-height:auto;
        flex-wrap:wrap;
      }

      #operationsView .ops-header-title{
        min-width:0;
      }

      #operationsView .ops-header-title strong{
        font-size:16px !important;
      }

      #operationsView .ops-header-actions{
        width:100%;
        display:grid !important;
        grid-template-columns:1fr 1fr;
        gap:8px;
      }

      #operationsView .ops-header-actions button{
        width:100%;
      }

      #operationsView .ops-content{
        padding:14px !important;
      }

      #operationsView .ops-module-head{
        padding:14px;
        border-radius:14px;
      }

      #operationsView .ops-module-head h2{
        font-size:18px;
      }

      #operationsView .ops-table-wrap{
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
      }

      #operationsView .ops-table{
        min-width:760px;
      }

      .ops-modal-backdrop{
        align-items:flex-end !important;
        padding:0 !important;
      }

      .ops-modal-box{
        width:100% !important;
        max-width:none !important;
        max-height:92dvh !important;
        border-radius:22px 22px 0 0 !important;
        padding:18px 16px 20px !important;
        box-sizing:border-box;
      }

      .ops-modal-head{
        position:sticky;
        top:0;
        z-index:3;
        margin:-18px -16px 16px !important;
        padding:16px;
        background:inherit;
        border-bottom:1px solid #e2e8f0;
      }

      #operationsView[data-theme="dark"] ~ .ops-modal-backdrop .ops-modal-head{
        border-bottom-color:#334155;
      }

      .ops-modal-head h3{
        font-size:18px;
      }

      .ops-form-grid-2{
        grid-template-columns:1fr !important;
      }

      .ops-modal-box input,
      .ops-modal-box select,
      .ops-modal-box textarea{
        font-size:16px !important;
      }

      .ops-modal-box button[type="submit"]{
        width:100%;
        min-height:50px;
        font-size:15px;
        position:sticky;
        bottom:0;
      }
    }

    @media(max-width:520px){

      #operationsView .ops-logo{
        width:38px;
        height:38px;
      }

      #operationsView .ops-brand strong{
        font-size:14px;
      }

      #operationsView .ops-brand small{
        font-size:10px;
      }

      #operationsView .ops-nav button{
        font-size:13px;
        padding:9px 11px !important;
      }

      #operationsView .ops-kpis{
        grid-template-columns:1fr 1fr !important;
        gap:10px !important;
      }

      #operationsView .ops-card{
        padding:14px !important;
      }

      #operationsView .ops-card strong{
        font-size:22px !important;
      }

      #operationsView .ops-hero{
        padding:16px !important;
      }

      #operationsView .ops-hero h1{
        font-size:20px !important;
      }

      #operationsView .ops-module-head{
        display:block !important;
      }

      #operationsView .ops-module-head .ops-primary-btn{
        margin-top:12px;
        width:100%;
      }

      #operationsView .ops-table{
        min-width:680px;
      }

      .ops-modal-box{
        max-height:94dvh !important;
      }
    }

/* ---- source style block #ayanNeutralDateInputs20260828 ---- */
input[data-ayan-date="1"]{
  direction:ltr!important;
  unicode-bidi:isolate!important;
  text-align:center!important;
  font-variant-numeric:tabular-nums;
  letter-spacing:.3px;
}
input[data-ayan-date="1"]::placeholder{
  direction:ltr!important;
  text-align:center!important;
  opacity:.72;
}
input[data-ayan-date="1"].ayan-date-invalid{
  border-color:#ef4444!important;
  box-shadow:0 0 0 3px rgba(239,68,68,.14)!important;
}

/* ---- source style block #ayanOperationsCrudUiV3Style ---- */
  #operationsView .ops-actions-cell{
    min-width:210px;
  }

  #operationsView .ops-row-actions{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
    align-items:center;
  }

  #operationsView .ops-action-btn{
    min-height:34px;
    padding:7px 10px;
    border-radius:9px;
    border:1px solid var(--ops-border,#dbe2ea);
    background:var(--ops-surface,#fff);
    color:var(--ops-text,#111827);
    font-family:inherit;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
    white-space:nowrap;
  }

  #operationsView .ops-action-btn:hover{
    background:var(--ops-surface-2,#f8fafc);
  }

  #operationsView .ops-action-btn.danger{
    color:#b91c1c;
    border-color:rgba(185,28,28,.28);
  }

  #operationsView[data-theme="dark"] .ops-action-btn.danger{
    color:#fca5a5;
    border-color:rgba(252,165,165,.25);
  }

  #operationsView .ops-action-btn.status{
    color:#1d4ed8;
  }

  #operationsView[data-theme="dark"] .ops-action-btn.status{
    color:#93c5fd;
  }

  #opsCrudModal .ops-crud-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
  }

  #opsCrudModal .ops-crud-full{
    grid-column:1/-1;
  }

  #opsCrudModal .ops-crud-field{
    display:flex;
    flex-direction:column;
    gap:7px;
  }

  #opsCrudModal .ops-crud-field label{
    font-size:13px;
    font-weight:800;
  }

  #opsCrudModal input,
  #opsCrudModal select,
  #opsCrudModal textarea{
    width:100%;
    box-sizing:border-box;
    min-height:46px;
    padding:10px 12px;
    border:1px solid #cbd5e1;
    border-radius:10px;
    background:#fff;
    color:#111827;
    font-family:inherit;
    font-size:14px;
  }

  #opsCrudModal textarea{
    min-height:100px;
    resize:vertical;
  }

  #operationsView[data-theme="dark"] ~ #opsCrudModal input,
  #operationsView[data-theme="dark"] ~ #opsCrudModal select,
  #operationsView[data-theme="dark"] ~ #opsCrudModal textarea{
    background:#111827;
    color:#f8fafc;
    border-color:#334155;
  }

  #operationsView[data-theme="dark"] ~ #opsCrudModal .ops-modal-box{
    background:#172033 !important;
    color:#f8fafc !important;
    border-color:#334155 !important;
  }

  #operationsView[data-theme="dark"] ~ #opsCrudModal .ops-crud-field label,
  #operationsView[data-theme="dark"] ~ #opsCrudModal h3{
    color:#f8fafc !important;
  }

  #opsCrudModal .ops-crud-footer{
    display:flex;
    gap:10px;
    justify-content:flex-end;
    margin-top:18px;
    padding-top:14px;
    border-top:1px solid #e2e8f0;
  }

  #operationsView[data-theme="dark"] ~ #opsCrudModal .ops-crud-footer{
    border-color:#334155;
  }

  #opsCrudModal .ops-crud-save{
    min-height:44px;
    padding:10px 22px;
    border:0;
    border-radius:10px;
    background:#2563eb;
    color:white;
    font-family:inherit;
    font-weight:900;
    cursor:pointer;
  }

  #opsCrudModal .ops-crud-cancel{
    min-height:44px;
    padding:10px 18px;
    border-radius:10px;
    border:1px solid #cbd5e1;
    background:#fff;
    color:#111827;
    font-family:inherit;
    font-weight:800;
    cursor:pointer;
  }

  #operationsView[data-theme="dark"] ~ #opsCrudModal .ops-crud-cancel{
    background:#1e293b;
    color:#f8fafc;
    border-color:#475569;
  }

  #opsCrudModal .ops-crud-message{
    margin-top:10px;
    min-height:20px;
    font-size:13px;
    font-weight:700;
  }

  @media(max-width:700px){

    #opsCrudModal{
      align-items:flex-end !important;
      padding:0 !important;
    }

    #opsCrudModal .ops-modal-box{
      width:100% !important;
      max-width:none !important;
      max-height:94dvh !important;
      overflow:auto;
      border-radius:22px 22px 0 0 !important;
      padding:18px 16px 22px !important;
    }

    #opsCrudModal .ops-crud-grid{
      grid-template-columns:1fr;
      gap:12px;
    }

    #opsCrudModal .ops-crud-full{
      grid-column:auto;
    }

    #opsCrudModal input,
    #opsCrudModal select,
    #opsCrudModal textarea{
      font-size:16px;
    }

    #opsCrudModal .ops-crud-footer{
      position:sticky;
      bottom:-22px;
      z-index:5;
      margin-left:-16px;
      margin-right:-16px;
      margin-bottom:-22px;
      padding:12px 16px 16px;
      background:#fff;
      display:grid;
      grid-template-columns:1fr 1fr;
    }

    #operationsView[data-theme="dark"] ~ #opsCrudModal .ops-crud-footer{
      background:#172033;
    }

    #opsCrudModal .ops-crud-save,
    #opsCrudModal .ops-crud-cancel{
      width:100%;
      min-height:48px;
    }

    #operationsView .ops-row-actions{
      min-width:190px;
    }

    #operationsView .ops-action-btn{
      min-height:38px;
      font-size:12px;
    }
  }

/* ---- source style block ---- */
/* AYAN OPERATIONS ACTIONS HEADER V1 */

#operationsView .ops-actions-head{
    min-width:210px;
    text-align:center !important;
}

#operationsView .ops-actions-cell{
    text-align:center !important;
}

#operationsView .ops-actions-cell > div{
    justify-content:center !important;
}

@media(max-width:520px){
    #operationsView .ops-actions-head,
    #operationsView .ops-actions-cell{
        min-width:190px;
    }
}

/* ---- source style block ---- */
#opsMaintenanceWorkflowModal{
  display:none;
  position:fixed;
  inset:0;
  z-index:10050;
  background:rgba(15,23,42,.58);
  align-items:center;
  justify-content:center;
  padding:20px;
}

#opsMaintenanceWorkflowModal .ops-workflow-box{
  width:min(1180px,96vw);
  max-height:92vh;
  overflow:auto;
  background:#fff;
  border-radius:20px;
  box-shadow:0 24px 70px rgba(0,0,0,.24);
  direction:rtl;
}

#opsMaintenanceWorkflowModal .ops-workflow-head{
  position:sticky;
  top:0;
  z-index:5;
  background:#fff;
  border-bottom:1px solid #e2e8f0;
  padding:18px 22px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
}

#opsMaintenanceWorkflowModal .ops-workflow-title{
  margin:0;
  font-size:20px;
  font-weight:900;
  color:#0f172a;
}

#opsMaintenanceWorkflowModal .ops-workflow-subtitle{
  margin-top:5px;
  color:#64748b;
  font-size:13px;
}

#opsMaintenanceWorkflowModal .ops-workflow-close{
  border:1px solid #cbd5e1;
  background:#f8fafc;
  color:#111827;
  border-radius:10px;
  min-height:40px;
  padding:0 16px;
  font-weight:800;
  cursor:pointer;
}

#opsMaintenanceWorkflowModal .ops-workflow-content{
  padding:22px;
}

.ops-workflow-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:20px;
}

.ops-workflow-summary-card{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:14px;
  padding:14px;
}

.ops-workflow-summary-card span{
  display:block;
  font-size:12px;
  color:#64748b;
  margin-bottom:6px;
}

.ops-workflow-summary-card strong{
  display:block;
  color:#0f172a;
  font-size:14px;
}

.ops-workflow-stage-wrap{
  overflow:auto;
  margin-bottom:20px;
  padding-bottom:4px;
}

.ops-workflow-stages{
  min-width:1000px;
  display:grid;
  grid-template-columns:repeat(9,1fr);
  gap:8px;
}

.ops-workflow-stage{
  border:1px solid #cbd5e1;
  background:#f8fafc;
  color:#475569;
  border-radius:12px;
  padding:11px 8px;
  text-align:center;
  font-size:12px;
  font-weight:800;
}

.ops-workflow-stage.done{
  background:#ecfdf5;
  border-color:#86efac;
  color:#166534;
}

.ops-workflow-stage.current{
  background:#eff6ff;
  border-color:#60a5fa;
  color:#1d4ed8;
  box-shadow:0 0 0 2px rgba(37,99,235,.08);
}

.ops-workflow-stage.closed{
  background:#f0fdf4;
  border-color:#22c55e;
  color:#166534;
}

.ops-workflow-main-grid{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);
  gap:18px;
}

.ops-workflow-panel{
  border:1px solid #e2e8f0;
  border-radius:16px;
  overflow:hidden;
}

.ops-workflow-panel-head{
  padding:14px 16px;
  font-weight:900;
  background:#f8fafc;
  border-bottom:1px solid #e2e8f0;
  color:#0f172a;
}

.ops-workflow-panel-body{
  padding:16px;
}

.ops-workflow-action-box{
  display:grid;
  gap:12px;
}

.ops-workflow-action-box label{
  display:grid;
  gap:6px;
  color:#334155;
  font-size:13px;
  font-weight:800;
}

.ops-workflow-action-box select,
.ops-workflow-action-box input,
.ops-workflow-action-box textarea{
  width:100%;
  box-sizing:border-box;
  border:1px solid #cbd5e1;
  background:#fff;
  color:#111827;
  border-radius:10px;
  padding:10px 12px;
  min-height:42px;
  font:inherit;
}

.ops-workflow-action-box textarea{
  min-height:90px;
  resize:vertical;
}

.ops-workflow-action-btn{
  border:0;
  background:#2563eb;
  color:#fff;
  border-radius:11px;
  min-height:44px;
  padding:10px 16px;
  font-weight:900;
  cursor:pointer;
}

.ops-workflow-action-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.ops-workflow-timeline{
  position:relative;
  display:grid;
  gap:0;
}

.ops-workflow-log{
  position:relative;
  padding:0 26px 18px 0;
  border-right:2px solid #e2e8f0;
  margin-right:7px;
}

.ops-workflow-log:last-child{
  padding-bottom:0;
}

.ops-workflow-log:before{
  content:"";
  position:absolute;
  right:-7px;
  top:2px;
  width:12px;
  height:12px;
  border-radius:50%;
  background:#2563eb;
  border:2px solid #fff;
  box-shadow:0 0 0 1px #93c5fd;
}

.ops-workflow-log strong{
  display:block;
  color:#0f172a;
  font-size:13px;
  margin-bottom:3px;
}

.ops-workflow-log small{
  color:#64748b;
  font-size:11px;
}

.ops-workflow-log p{
  margin:7px 0 0;
  color:#475569;
  font-size:13px;
  line-height:1.65;
}

.ops-open-workflow-btn{
  border:1px solid #93c5fd;
  background:#eff6ff;
  color:#1d4ed8;
  border-radius:9px;
  padding:7px 10px;
  min-height:34px;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}

#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-box,
#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-head{
  background:#0f172a;
  color:#f8fafc;
}

#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-head{
  border-color:#334155;
}

#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-title,
#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-summary-card strong,
#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-panel-head,
#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-log strong{
  color:#f8fafc;
}

#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-subtitle,
#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-summary-card span,
#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-log small,
#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-log p{
  color:#a8b3c5;
}

#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-summary-card,
#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-panel,
#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-panel-head{
  background:#172033;
  border-color:#334155;
}

#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-action-box label{
  color:#e2e8f0;
}

#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-action-box input,
#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-action-box select,
#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-action-box textarea{
  background:#0f172a;
  color:#f8fafc;
  border-color:#475569;
}

#operationsView[data-theme="dark"] ~ #opsMaintenanceWorkflowModal .ops-workflow-close{
  background:#1e293b;
  color:#f8fafc;
  border-color:#475569;
}

@media(max-width:900px){

  #opsMaintenanceWorkflowModal{
    padding:0;
    align-items:flex-end;
  }

  #opsMaintenanceWorkflowModal .ops-workflow-box{
    width:100%;
    max-height:96vh;
    border-radius:20px 20px 0 0;
  }

  .ops-workflow-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .ops-workflow-main-grid{
    grid-template-columns:1fr;
  }

}


/* AYAN MAINTENANCE IMAGE PREVIEW V1 */

.ops-attachment-image-preview{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.ops-attachment-image-preview img{
  width:120px;
  height:90px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid #cbd5e1;
  cursor:pointer;
  background:#f8fafc;
}

#opsImagePreviewModal{
  display:none;
  position:fixed;
  inset:0;
  z-index:11000;
  background:rgba(0,0,0,.78);
  align-items:center;
  justify-content:center;
  padding:20px;
}

#opsImagePreviewModal img{
  max-width:95vw;
  max-height:90vh;
  object-fit:contain;
  border-radius:12px;
  background:#000;
}

#opsImagePreviewModal button{
  position:absolute;
  top:18px;
  left:18px;
  border:0;
  border-radius:10px;
  padding:10px 14px;
  font-weight:800;
  cursor:pointer;
}

/* ---- source style block ---- */
/* ===== TRANSFER WORKFLOW MODAL ===== */

#opsTransferWorkflowModal{
  display:none;
  position:fixed;
  inset:0;
  z-index:10550;
  background:rgba(15,23,42,.68);
  backdrop-filter:blur(3px);
  padding:20px;
  overflow:auto;
}

#opsTransferWorkflowModal.active{
  display:flex;
  align-items:flex-start;
  justify-content:center;
}

.ops-transfer-workflow-card{
  width:min(1180px,100%);
  margin:auto;
  background:var(--ops-card,#fff);
  color:var(--ops-text,#0f172a);
  border:1px solid var(--ops-border,#e2e8f0);
  border-radius:18px;
  box-shadow:0 20px 60px rgba(15,23,42,.28);
  overflow:hidden;
}

.ops-transfer-workflow-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:18px 20px;
  border-bottom:1px solid var(--ops-border,#e2e8f0);
}

.ops-transfer-workflow-head h3{
  margin:0;
  font-size:20px;
}

.ops-transfer-workflow-close{
  border:0;
  border-radius:10px;
  padding:9px 12px;
  cursor:pointer;
  font-weight:800;
}

.ops-transfer-workflow-body{
  padding:20px;
}

.ops-transfer-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}

.ops-transfer-summary-card{
  padding:14px;
  border:1px solid var(--ops-border,#e2e8f0);
  border-radius:14px;
  background:var(--ops-soft,#f8fafc);
}

.ops-transfer-summary-card small{
  display:block;
  color:#64748b;
  margin-bottom:5px;
}

.ops-transfer-summary-card strong{
  display:block;
  overflow-wrap:anywhere;
}

.ops-transfer-stage-bar{
  display:grid;
  grid-template-columns:repeat(8,minmax(115px,1fr));
  gap:8px;
  overflow-x:auto;
  padding-bottom:8px;
  margin-bottom:18px;
}

.ops-transfer-stage{
  min-width:115px;
  padding:10px 8px;
  border-radius:12px;
  border:1px solid var(--ops-border,#e2e8f0);
  text-align:center;
  font-size:12px;
  font-weight:800;
  opacity:.55;
}

.ops-transfer-stage.done{
  opacity:1;
  background:#dcfce7;
  border-color:#86efac;
}

.ops-transfer-stage.current{
  opacity:1;
  background:#dbeafe;
  border-color:#93c5fd;
}

.ops-transfer-grid{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);
  gap:16px;
}

.ops-transfer-panel{
  border:1px solid var(--ops-border,#e2e8f0);
  border-radius:14px;
  overflow:hidden;
}

.ops-transfer-panel-head{
  padding:12px 14px;
  font-weight:900;
  border-bottom:1px solid var(--ops-border,#e2e8f0);
  background:var(--ops-soft,#f8fafc);
}

.ops-transfer-panel-body{
  padding:14px;
}

.ops-transfer-timeline-item{
  position:relative;
  padding:0 18px 18px 0;
  margin-right:8px;
  border-right:2px solid #cbd5e1;
}

.ops-transfer-timeline-item:last-child{
  border-right-color:transparent;
}

.ops-transfer-timeline-item:before{
  content:"";
  position:absolute;
  right:-7px;
  top:2px;
  width:11px;
  height:11px;
  border-radius:50%;
  background:#2563eb;
}

.ops-transfer-timeline-item strong{
  display:block;
  margin-bottom:4px;
}

.ops-transfer-timeline-meta{
  font-size:12px;
  color:#64748b;
  margin-bottom:4px;
}

.ops-transfer-action-box label{
  display:block;
  margin-bottom:10px;
}

.ops-transfer-action-box select,
.ops-transfer-action-box textarea{
  width:100%;
  min-height:42px;
  border:1px solid var(--ops-border,#cbd5e1);
  border-radius:10px;
  padding:9px 10px;
  background:var(--ops-input,#fff);
  color:inherit;
  font:inherit;
}

.ops-transfer-action-box textarea{
  min-height:90px;
  resize:vertical;
}

.ops-transfer-primary-btn{
  border:0;
  border-radius:10px;
  padding:10px 14px;
  font-weight:900;
  cursor:pointer;
  background:#2563eb;
  color:#fff;
}

.ops-transfer-warning-btn{
  border:0;
  border-radius:10px;
  padding:10px 14px;
  font-weight:900;
  cursor:pointer;
  background:#0f172a;
  color:#fff;
}

.ops-transfer-attachments{
  margin-top:16px;
}

.ops-transfer-attachment-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding:11px 0;
  border-bottom:1px solid var(--ops-border,#e2e8f0);
}

.ops-transfer-attachment-row:last-child{
  border-bottom:0;
}

.ops-transfer-attachment-preview img{
  width:120px;
  height:88px;
  object-fit:cover;
  border-radius:10px;
  border:1px solid var(--ops-border,#cbd5e1);
  margin-top:8px;
  cursor:pointer;
}

@media(max-width:900px){

  #opsTransferWorkflowModal{
    padding:0;
  }

  #opsTransferWorkflowModal.active{
    align-items:flex-end;
  }

  .ops-transfer-workflow-card{
    width:100%;
    max-height:94vh;
    border-radius:18px 18px 0 0;
    overflow:auto;
  }

  .ops-transfer-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .ops-transfer-grid{
    grid-template-columns:1fr;
  }

}

@media(max-width:520px){

  .ops-transfer-summary{
    grid-template-columns:1fr;
  }

  .ops-transfer-workflow-body{
    padding:14px;
  }

}

#operationsView[data-theme="dark"] .ops-transfer-stage.done{
  background:#14532d;
  border-color:#166534;
}

#operationsView[data-theme="dark"] .ops-transfer-stage.current{
  background:#1e3a8a;
  border-color:#1d4ed8;
}

/* ---- source style block ---- */
#opsLicenseReviewModal{
  display:none;
  position:fixed;
  inset:0;
  z-index:10560;
  background:rgba(15,23,42,.68);
  backdrop-filter:blur(3px);
  padding:20px;
  overflow:auto;
}

#opsLicenseReviewModal.active{
  display:flex;
  align-items:flex-start;
  justify-content:center;
}

.ops-license-review-card{
  width:min(900px,100%);
  margin:auto;
  background:var(--ops-card,#fff);
  color:var(--ops-text,#0f172a);
  border:1px solid var(--ops-border,#e2e8f0);
  border-radius:18px;
  box-shadow:0 20px 60px rgba(15,23,42,.25);
  overflow:hidden;
}

.ops-license-review-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:18px 20px;
  border-bottom:1px solid var(--ops-border,#e2e8f0);
}

.ops-license-review-body{
  padding:20px;
}

.ops-license-review-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.ops-license-review-grid label{
  display:block;
}

.ops-license-review-grid input,
.ops-license-review-grid textarea{
  width:100%;
  box-sizing:border-box;
  min-height:42px;
  border:1px solid var(--ops-border,#cbd5e1);
  border-radius:10px;
  padding:9px 10px;
  background:var(--ops-input,#fff);
  color:inherit;
  font:inherit;
}

.ops-license-review-grid textarea{
  min-height:100px;
  resize:vertical;
}

.ops-license-review-span{
  grid-column:1/-1;
}

.ops-license-platforms{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.ops-license-platform-item{
  border:1px solid var(--ops-border,#e2e8f0);
  border-radius:12px;
  padding:10px;
}

.ops-license-platform-item strong{
  display:block;
  margin-bottom:6px;
}

.ops-license-review-actions{
  margin-top:18px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.ops-license-review-btn{
  border:0;
  border-radius:10px;
  padding:10px 14px;
  font-weight:900;
  cursor:pointer;
  background:#2563eb;
  color:#fff;
}

.ops-license-review-close{
  border:0;
  border-radius:10px;
  padding:9px 12px;
  cursor:pointer;
  font-weight:800;
}

@media(max-width:700px){

  #opsLicenseReviewModal{
    padding:0;
  }

  #opsLicenseReviewModal.active{
    align-items:flex-end;
  }

  .ops-license-review-card{
    width:100%;
    max-height:94vh;
    overflow:auto;
    border-radius:18px 18px 0 0;
  }

  .ops-license-review-grid{
    grid-template-columns:1fr;
  }

  .ops-license-platforms{
    grid-template-columns:1fr;
  }

}


/* =========================================================
   AYAN OPERATIONS ANALYTICS UI V1
========================================================= */

.ops-analytics-page{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.ops-analytics-head{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
  flex-wrap:wrap;
}

.ops-analytics-head h2{
  margin:0 0 6px;
  font-size:24px;
}

.ops-analytics-head p{
  margin:0;
  opacity:.72;
}

.ops-analytics-filters{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.ops-analytics-filters select{
  min-height:42px;
  border:1px solid var(--ops-border,#dbe3ec);
  border-radius:10px;
  padding:0 12px;
  background:var(--ops-card,#fff);
  color:var(--ops-text,#111827);
}

.ops-analytics-message{
  min-height:18px;
  font-size:13px;
  font-weight:700;
}

.ops-analytics-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.ops-analytics-card{
  background:var(--ops-card,#fff);
  border:1px solid var(--ops-border,#e2e8f0);
  border-radius:14px;
  padding:16px;
}

.ops-analytics-card span{
  display:block;
  font-size:12px;
  opacity:.68;
  margin-bottom:8px;
}

.ops-analytics-card strong{
  font-size:23px;
}

.ops-analytics-highlight-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.ops-analytics-highlight{
  background:var(--ops-card,#fff);
  border:1px solid var(--ops-border,#e2e8f0);
  border-radius:16px;
  padding:18px;
}

.ops-analytics-highlight span{
  display:block;
  font-size:12px;
  opacity:.68;
  margin-bottom:9px;
}

.ops-analytics-highlight strong{
  display:block;
  font-size:19px;
  margin-bottom:6px;
}

.ops-analytics-highlight small{
  opacity:.7;
}

.ops-analytics-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.ops-analytics-panel{
  background:var(--ops-card,#fff);
  border:1px solid var(--ops-border,#e2e8f0);
  border-radius:16px;
  overflow:hidden;
}

.ops-analytics-panel-head{
  padding:15px 16px;
  border-bottom:1px solid var(--ops-border,#e2e8f0);
}

.ops-analytics-panel-head h3{
  margin:0;
  font-size:16px;
}

.ops-analytics-list{
  padding:8px 14px 14px;
}

.ops-analytics-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:11px 2px;
  border-bottom:1px solid var(--ops-border,#eef2f7);
}

.ops-analytics-row:last-child{
  border-bottom:none;
}

.ops-analytics-row-main{
  min-width:0;
}

.ops-analytics-row-main strong{
  display:block;
  font-size:14px;
}

.ops-analytics-row-main small{
  display:block;
  opacity:.62;
  margin-top:3px;
}

.ops-analytics-count{
  min-width:36px;
  height:36px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--ops-soft,#f1f5f9);
  font-weight:900;
}

@media(max-width:900px){

  .ops-analytics-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .ops-analytics-highlight-grid{
    grid-template-columns:1fr;
  }

  .ops-analytics-grid{
    grid-template-columns:1fr;
  }

}

@media(max-width:520px){

  .ops-analytics-kpis{
    grid-template-columns:1fr 1fr;
  }

  .ops-analytics-filters{
    width:100%;
  }

  .ops-analytics-filters select,
  .ops-analytics-filters button{
    flex:1;
  }

}


/* =========================================================
   AYAN OPERATIONS GLOBAL G V1
========================================================= */

.ops-global-g{
  display:none;
  position:fixed;
  left:22px;
  bottom:22px;
  z-index:10040;
  direction:rtl;
  font-family:inherit;
}

body.ayan-operations-active .ops-global-g{
  display:block;
}


.ops-global-g-button{
  min-width:72px;
  height:64px;
  padding:7px 10px;
  border:1px solid rgba(59,130,246,.45);
  border-radius:20px;
  background:#0f172a;
  color:#fff;
  box-shadow:
    0 14px 35px rgba(2,6,23,.28),
    0 0 0 3px rgba(37,99,235,.08);
  display:flex;
  align-items:center;
  gap:9px;
  cursor:pointer;
}

.ops-global-g-button img{
  width:48px;
  height:48px;
  object-fit:cover;
  border-radius:50%;
  border:2px solid #3b82f6;
}

.ops-global-g-button-text{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  line-height:1.2;
}

.ops-global-g-button-text strong{
  font-size:17px;
}

.ops-global-g-button-text small{
  margin-top:3px;
  max-width:110px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  opacity:.72;
  font-size:10px;
}


.ops-global-g-panel{
  display:none;
  position:absolute;
  left:0;
  bottom:76px;
  width:min(410px,calc(100vw - 28px));
  height:min(650px,calc(100vh - 120px));
  background:#0f172a;
  color:#f8fafc;
  border:1px solid #334155;
  border-radius:20px;
  box-shadow:0 25px 70px rgba(2,6,23,.38);
  overflow:hidden;
  flex-direction:column;
}

.ops-global-g-panel.show{
  display:flex;
}


.ops-global-g-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:13px;
  border-bottom:1px solid #334155;
  background:#111827;
}

.ops-global-g-identity{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.ops-global-g-identity img{
  width:42px;
  height:42px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid #3b82f6;
}

.ops-global-g-identity strong,
.ops-global-g-identity small{
  display:block;
}

.ops-global-g-identity strong{
  font-size:14px;
}

.ops-global-g-identity small{
  margin-top:3px;
  color:#94a3b8;
  font-size:11px;
}


.ops-global-g-head-actions{
  display:flex;
  gap:6px;
}

.ops-global-g-head-actions button{
  width:34px;
  height:34px;
  border:1px solid #334155;
  border-radius:10px;
  background:#1e293b;
  color:#fff;
  cursor:pointer;
}


.ops-global-g-messages{
  flex:1;
  min-height:0;
  overflow:auto;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:11px;
  background:#0b1220;
}

.ops-global-g-msg{
  display:flex;
  align-items:flex-start;
  gap:8px;
}

.ops-global-g-msg.user{
  flex-direction:row-reverse;
}

.ops-global-g-avatar{
  width:34px;
  height:34px;
  flex:0 0 34px;
  border-radius:50%;
  overflow:hidden;
  border:1px solid #3b82f6;
}

.ops-global-g-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.ops-global-g-msg.user .ops-global-g-avatar{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#166534;
  border-color:#22c55e;
  font-size:9px;
  font-weight:900;
}


.ops-global-g-bubble{
  max-width:82%;
  border:1px solid #334155;
  background:#1e293b;
  padding:10px 11px;
  border-radius:13px;
  line-height:1.65;
  font-size:13px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.ops-global-g-msg.user .ops-global-g-bubble{
  background:#14532d;
  border-color:#166534;
}


.ops-global-g-quick{
  display:flex;
  gap:6px;
  overflow-x:auto;
  padding:9px 11px;
  border-top:1px solid #1e293b;
  background:#0f172a;
}

.ops-global-g-quick button{
  flex:0 0 auto;
  border:1px solid #334155;
  border-radius:999px;
  background:#1e293b;
  color:#e2e8f0;
  padding:7px 10px;
  font-size:11px;
  cursor:pointer;
}


.ops-global-g-composer{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  padding:11px;
  border-top:1px solid #334155;
  background:#111827;
}

.ops-global-g-composer textarea{
  width:100%;
  resize:none;
  border:1px solid #475569;
  border-radius:12px;
  background:#0f172a;
  color:#fff;
  padding:10px;
  font:inherit;
  outline:none;
}

.ops-global-g-composer textarea:focus{
  border-color:#3b82f6;
}

.ops-global-g-composer button{
  border:0;
  border-radius:12px;
  background:#2563eb;
  color:#fff;
  padding:0 16px;
  font-weight:800;
  cursor:pointer;
}

.ops-global-g-composer button:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.ops-global-g-status{
  min-height:22px;
  padding:0 12px 8px;
  background:#111827;
  color:#94a3b8;
  font-size:10px;
}


#operationsView[data-theme="light"] ~ .ops-global-g
.ops-global-g-panel{
  background:#fff;
  color:#0f172a;
  border-color:#cbd5e1;
}

#operationsView[data-theme="light"] ~ .ops-global-g
.ops-global-g-head,
#operationsView[data-theme="light"] ~ .ops-global-g
.ops-global-g-composer,
#operationsView[data-theme="light"] ~ .ops-global-g
.ops-global-g-status{
  background:#f8fafc;
  border-color:#e2e8f0;
}

#operationsView[data-theme="light"] ~ .ops-global-g
.ops-global-g-messages{
  background:#f8fafc;
}

#operationsView[data-theme="light"] ~ .ops-global-g
.ops-global-g-bubble{
  background:#fff;
  border-color:#cbd5e1;
  color:#0f172a;
}

#operationsView[data-theme="light"] ~ .ops-global-g
.ops-global-g-composer textarea{
  background:#fff;
  color:#0f172a;
  border-color:#cbd5e1;
}


@media(max-width:650px){

  .ops-global-g{
    left:12px;
    bottom:12px;
  }

  .ops-global-g-button{
    min-width:58px;
    height:58px;
    border-radius:18px;
    padding:5px;
  }

  .ops-global-g-button img{
    width:46px;
    height:46px;
  }

  .ops-global-g-button-text{
    display:none;
  }

  .ops-global-g-panel{
    position:fixed;
    left:8px;
    right:8px;
    bottom:8px;
    width:auto;
    height:min(78vh,700px);
    border-radius:20px;
  }

  .ops-global-g-panel.show +
  .ops-global-g-button{
    display:none;
  }

  .ops-global-g-composer textarea{
    font-size:16px;
  }

}


/* =========================================================
   AYAN OPERATIONS CALENDAR UI V1
========================================================= */

.ops-calendar-page{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.ops-calendar-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;
}

.ops-calendar-head h2{
  margin:0 0 6px;
}

.ops-calendar-head p{
  margin:0;
  opacity:.65;
}

.ops-calendar-controls{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.ops-calendar-controls button,
.ops-calendar-filter button{
  border:1px solid var(--ops-border,#cbd5e1);
  background:var(--ops-card,#fff);
  color:var(--ops-text,#111827);
  border-radius:10px;
  min-height:38px;
  padding:0 12px;
  cursor:pointer;
  font-weight:700;
}

.ops-calendar-controls strong{
  min-width:145px;
  text-align:center;
}

.ops-calendar-kpis{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}

.ops-calendar-kpis > div{
  background:var(--ops-card,#fff);
  border:1px solid var(--ops-border,#e2e8f0);
  border-radius:14px;
  padding:14px;
}

.ops-calendar-kpis span{
  display:block;
  font-size:12px;
  opacity:.65;
  margin-bottom:6px;
}

.ops-calendar-kpis strong{
  font-size:22px;
}

.ops-calendar-filter{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
}

.ops-calendar-filter button.active{
  background:#2563eb;
  border-color:#2563eb;
  color:#fff;
}

.ops-calendar-message{
  min-height:18px;
  font-size:12px;
  opacity:.75;
}

.ops-calendar-timeline{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.ops-calendar-day{
  background:var(--ops-card,#fff);
  border:1px solid var(--ops-border,#e2e8f0);
  border-radius:16px;
  overflow:hidden;
}

.ops-calendar-day-head{
  padding:12px 15px;
  border-bottom:1px solid var(--ops-border,#e2e8f0);
  font-weight:900;
}

.ops-calendar-event{
  display:grid;
  grid-template-columns:95px 1fr auto;
  gap:12px;
  padding:13px 15px;
  border-bottom:1px solid var(--ops-border,#eef2f7);
  cursor:pointer;
}

.ops-calendar-event:last-child{
  border-bottom:none;
}

.ops-calendar-event:hover{
  background:rgba(37,99,235,.05);
}

.ops-calendar-event-time{
  font-weight:800;
  font-size:12px;
}

.ops-calendar-event-title strong{
  display:block;
}

.ops-calendar-event-title small{
  display:block;
  opacity:.65;
  margin-top:4px;
  line-height:1.5;
}

.ops-calendar-event-type{
  height:30px;
  display:flex;
  align-items:center;
  padding:0 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  background:var(--ops-soft,#f1f5f9);
}

.ops-calendar-event.past{
  opacity:.65;
}

@media(max-width:900px){

  .ops-calendar-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

}

@media(max-width:600px){

  .ops-calendar-event{
    grid-template-columns:70px 1fr;
  }

  .ops-calendar-event-type{
    grid-column:2;
    width:max-content;
  }

}


/* =========================================================
   AYAN OPERATIONS CONTRAST FIX V1
========================================================= */


/* =========================================================
   LIGHT MODE — CALENDAR
========================================================= */

#operationsView[data-theme="light"] .ops-calendar-page,
#operationsView[data-theme="light"] .ops-calendar-page h2,
#operationsView[data-theme="light"] .ops-calendar-page h3,
#operationsView[data-theme="light"] .ops-calendar-page strong,
#operationsView[data-theme="light"] .ops-calendar-page span,
#operationsView[data-theme="light"] .ops-calendar-page div{
  color:#0f172a !important;
}

#operationsView[data-theme="light"] .ops-calendar-head p,
#operationsView[data-theme="light"] .ops-calendar-message,
#operationsView[data-theme="light"] .ops-calendar-event-title small{
  color:#475569 !important;
  opacity:1 !important;
}

#operationsView[data-theme="light"] .ops-calendar-kpis > div,
#operationsView[data-theme="light"] .ops-calendar-day{
  background:#ffffff !important;
  border-color:#cbd5e1 !important;
  color:#0f172a !important;
}

#operationsView[data-theme="light"] .ops-calendar-day-head{
  background:#f8fafc !important;
  color:#0f172a !important;
  border-color:#cbd5e1 !important;
}

#operationsView[data-theme="light"] .ops-calendar-event{
  background:#ffffff !important;
  color:#0f172a !important;
  border-color:#e2e8f0 !important;
}

#operationsView[data-theme="light"] .ops-calendar-event:hover{
  background:#eff6ff !important;
}

#operationsView[data-theme="light"] .ops-calendar-event-time{
  color:#1e3a8a !important;
}

#operationsView[data-theme="light"] .ops-calendar-event-type{
  background:#e2e8f0 !important;
  color:#0f172a !important;
}

#operationsView[data-theme="light"] .ops-calendar-controls button,
#operationsView[data-theme="light"] .ops-calendar-filter button{
  background:#ffffff !important;
  color:#0f172a !important;
  border-color:#94a3b8 !important;
}

#operationsView[data-theme="light"] .ops-calendar-filter button.active{
  background:#2563eb !important;
  color:#ffffff !important;
  border-color:#2563eb !important;
}

#operationsView[data-theme="light"] .ops-calendar-controls strong{
  color:#0f172a !important;
}


/* =========================================================
   DARK MODE — CALENDAR
========================================================= */

#operationsView[data-theme="dark"] .ops-calendar-page,
#operationsView[data-theme="dark"] .ops-calendar-page h2,
#operationsView[data-theme="dark"] .ops-calendar-page h3,
#operationsView[data-theme="dark"] .ops-calendar-page strong,
#operationsView[data-theme="dark"] .ops-calendar-page span,
#operationsView[data-theme="dark"] .ops-calendar-page div{
  color:#f8fafc !important;
}

#operationsView[data-theme="dark"] .ops-calendar-head p,
#operationsView[data-theme="dark"] .ops-calendar-message,
#operationsView[data-theme="dark"] .ops-calendar-event-title small{
  color:#cbd5e1 !important;
  opacity:1 !important;
}

#operationsView[data-theme="dark"] .ops-calendar-kpis > div,
#operationsView[data-theme="dark"] .ops-calendar-day{
  background:#111827 !important;
  border-color:#334155 !important;
  color:#f8fafc !important;
}

#operationsView[data-theme="dark"] .ops-calendar-day-head{
  background:#0f172a !important;
  color:#f8fafc !important;
  border-color:#334155 !important;
}

#operationsView[data-theme="dark"] .ops-calendar-event{
  background:#111827 !important;
  color:#f8fafc !important;
  border-color:#334155 !important;
}

#operationsView[data-theme="dark"] .ops-calendar-event:hover{
  background:#172554 !important;
}

#operationsView[data-theme="dark"] .ops-calendar-event-time{
  color:#93c5fd !important;
}

#operationsView[data-theme="dark"] .ops-calendar-event-type{
  background:#1e293b !important;
  color:#f8fafc !important;
}

#operationsView[data-theme="dark"] .ops-calendar-controls button,
#operationsView[data-theme="dark"] .ops-calendar-filter button{
  background:#1e293b !important;
  color:#f8fafc !important;
  border-color:#475569 !important;
}

#operationsView[data-theme="dark"] .ops-calendar-filter button.active{
  background:#2563eb !important;
  color:#ffffff !important;
  border-color:#3b82f6 !important;
}

#operationsView[data-theme="dark"] .ops-calendar-controls strong{
  color:#f8fafc !important;
}


/* =========================================================
   FIX "ملف الصيانة" BUTTON
   Target by onclick so it works even if class changes.
========================================================= */

#operationsView button[onclick*="ayanOpenMaintenanceWorkflow"]{
  background:#2563eb !important;
  color:#ffffff !important;
  border:1px solid #1d4ed8 !important;
  font-weight:800 !important;
  opacity:1 !important;
  text-shadow:none !important;
}

#operationsView button[onclick*="ayanOpenMaintenanceWorkflow"] *{
  color:#ffffff !important;
  opacity:1 !important;
}

#operationsView[data-theme="light"]
button[onclick*="ayanOpenMaintenanceWorkflow"]{
  background:#1d4ed8 !important;
  color:#ffffff !important;
  border-color:#1e40af !important;
}

#operationsView[data-theme="dark"]
button[onclick*="ayanOpenMaintenanceWorkflow"]{
  background:#3b82f6 !important;
  color:#ffffff !important;
  border-color:#60a5fa !important;
}


/* Other action buttons inside maintenance rows */
#operationsView[data-theme="light"] #opsMaintenanceBody button{
  color:#0f172a;
  opacity:1;
}

#operationsView[data-theme="dark"] #opsMaintenanceBody button{
  color:#f8fafc;
  opacity:1;
}


/* Preserve readable disabled buttons */
#operationsView button:disabled{
  opacity:.55 !important;
}



/* =========================================================
   AYAN MAINTENANCE WORKFLOW BUTTON DARK FIX V2
========================================================= */

#operationsView[data-theme="dark"]
#opsMaintenanceBody
button[onclick*="ayanOpenMaintenanceWorkflow"]{
  background:#2563eb !important;
  color:#ffffff !important;
  border:1px solid #60a5fa !important;
  opacity:1 !important;
  visibility:visible !important;
  font-weight:900 !important;
  -webkit-text-fill-color:#ffffff !important;
  text-shadow:none !important;
  box-shadow:0 0 0 1px rgba(96,165,250,.25) !important;
}

#operationsView[data-theme="dark"]
#opsMaintenanceBody
button[onclick*="ayanOpenMaintenanceWorkflow"]:hover{
  background:#1d4ed8 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}

#operationsView[data-theme="dark"]
#opsMaintenanceBody
button[onclick*="ayanOpenMaintenanceWorkflow"] *{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
  visibility:visible !important;
}

/* AYAN MAINTENANCE WORKFLOW BUTTON REAL FIX V3 */

/* =========================================================
   AYAN MAINTENANCE WORKFLOW BUTTON REAL FIX V3
========================================================= */

#operationsView .ops-maintenance-workflow-open-btn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:5px !important;
  min-height:38px !important;
  padding:8px 12px !important;
  border-radius:9px !important;
  font-weight:900 !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
  opacity:1 !important;
  visibility:visible !important;
}


/* LIGHT */
#operationsView[data-theme="light"]
.ops-maintenance-workflow-open-btn{
  background:#1d4ed8 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  border:1px solid #1e40af !important;
}


/* DARK */
#operationsView[data-theme="dark"]
.ops-maintenance-workflow-open-btn{
  background:#2563eb !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  border:1px solid #93c5fd !important;
  box-shadow:0 0 0 1px rgba(147,197,253,.20) !important;
}


/* Kill any inherited washed-out state */
#operationsView[data-theme="dark"]
#opsMaintenanceBody
.ops-maintenance-workflow-open-btn{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
  filter:none !important;
}


#operationsView[data-theme="dark"]
.ops-maintenance-workflow-open-btn:hover{
  background:#1d4ed8 !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}


/* =========================================================
   AYAN OPERATIONS NOTIFICATIONS DARK CONTRAST FIX V1
========================================================= */

/* DARK MODE — notification dropdown container */
#operationsView[data-theme="dark"] .ops-notification-dropdown,
#operationsView[data-theme="dark"] .ops-notification-panel,
#operationsView[data-theme="dark"] #opsNotificationDropdown{
  background:#0f172a !important;
  color:#f8fafc !important;
  border-color:#334155 !important;
}

/* DARK MODE — header / title / counters */
#operationsView[data-theme="dark"] .ops-notification-dropdown *,
#operationsView[data-theme="dark"] .ops-notification-panel *,
#operationsView[data-theme="dark"] #opsNotificationDropdown *{
  color:#f8fafc !important;
  -webkit-text-fill-color:#f8fafc !important;
}

/* Secondary text */
#operationsView[data-theme="dark"] .ops-notification-dropdown small,
#operationsView[data-theme="dark"] .ops-notification-dropdown p,
#operationsView[data-theme="dark"] .ops-notification-dropdown .ops-muted,
#operationsView[data-theme="dark"] .ops-notification-panel small,
#operationsView[data-theme="dark"] .ops-notification-panel p,
#operationsView[data-theme="dark"] #opsNotificationDropdown small,
#operationsView[data-theme="dark"] #opsNotificationDropdown p{
  color:#cbd5e1 !important;
  -webkit-text-fill-color:#cbd5e1 !important;
  opacity:1 !important;
}

/* Notification rows */
#operationsView[data-theme="dark"] .ops-notification-item{
  background:#111827 !important;
  color:#f8fafc !important;
  border-color:#334155 !important;
}

#operationsView[data-theme="dark"] .ops-notification-item:hover{
  background:#172554 !important;
}

/* unread notification */
#operationsView[data-theme="dark"] .ops-notification-item.unread{
  background:#172033 !important;
}

/* buttons inside dropdown */
#operationsView[data-theme="dark"] .ops-notification-dropdown button,
#operationsView[data-theme="dark"] .ops-notification-panel button,
#operationsView[data-theme="dark"] #opsNotificationDropdown button{
  color:#f8fafc !important;
  -webkit-text-fill-color:#f8fafc !important;
}

/* Keep bell badge readable */
#operationsView[data-theme="dark"] #opsNotificationBadge{
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  opacity:1 !important;
}

/* LIGHT MODE safety too */
#operationsView[data-theme="light"] .ops-notification-dropdown,
#operationsView[data-theme="light"] .ops-notification-panel,
#operationsView[data-theme="light"] #opsNotificationDropdown{
  background:#ffffff !important;
  color:#0f172a !important;
  border-color:#cbd5e1 !important;
}

#operationsView[data-theme="light"] .ops-notification-dropdown *,
#operationsView[data-theme="light"] .ops-notification-panel *,
#operationsView[data-theme="light"] #opsNotificationDropdown *{
  color:#0f172a !important;
  -webkit-text-fill-color:#0f172a !important;
}

#operationsView[data-theme="light"] .ops-notification-dropdown small,
#operationsView[data-theme="light"] .ops-notification-dropdown p,
#operationsView[data-theme="light"] .ops-notification-dropdown .ops-muted,
#operationsView[data-theme="light"] .ops-notification-panel small,
#operationsView[data-theme="light"] #opsNotificationDropdown small,
#operationsView[data-theme="light"] #opsNotificationDropdown p{
  color:#475569 !important;
  -webkit-text-fill-color:#475569 !important;
  opacity:1 !important;
}


/* =========================================================
   AYAN OPERATIONS AUDIT UI V1
========================================================= */

#operationsView .ops-audit-page{
  display:flex;
  flex-direction:column;
  gap:18px;
}

#operationsView .ops-audit-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

#operationsView .ops-audit-head h2{
  margin:0 0 5px;
  font-size:22px;
}

#operationsView .ops-audit-head p{
  margin:0;
  color:var(--ops-muted,#64748b);
  font-size:13px;
}

#operationsView .ops-audit-refresh{
  border:1px solid var(--ops-border,#cbd5e1);
  background:var(--ops-surface,#fff);
  color:var(--ops-text,#0f172a);
  min-height:40px;
  padding:8px 14px;
  border-radius:10px;
  font-weight:800;
  cursor:pointer;
}

#operationsView .ops-audit-kpis{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
}

#operationsView .ops-audit-kpi{
  padding:16px;
  border-radius:14px;
  border:1px solid var(--ops-border,#e2e8f0);
  background:var(--ops-surface,#fff);
}

#operationsView .ops-audit-kpi span{
  display:block;
  font-size:12px;
  color:var(--ops-muted,#64748b);
  margin-bottom:8px;
  font-weight:700;
}

#operationsView .ops-audit-kpi strong{
  display:block;
  font-size:24px;
  color:var(--ops-text,#0f172a);
}

#operationsView .ops-audit-toolbar{
  display:grid;
  grid-template-columns:180px 200px minmax(240px,1fr);
  gap:12px;
  padding:14px;
  border:1px solid var(--ops-border,#e2e8f0);
  background:var(--ops-surface,#fff);
  border-radius:14px;
}

#operationsView .ops-audit-filter-group{
  display:flex;
  flex-direction:column;
  gap:6px;
}

#operationsView .ops-audit-filter-group label{
  font-size:12px;
  font-weight:800;
  color:var(--ops-muted,#64748b);
}

#operationsView .ops-audit-filter-group select,
#operationsView .ops-audit-filter-group input{
  width:100%;
  box-sizing:border-box;
  min-height:42px;
  padding:8px 10px;
  border:1px solid var(--ops-border,#cbd5e1);
  border-radius:10px;
  background:var(--ops-surface,#fff);
  color:var(--ops-text,#0f172a);
  outline:none;
}

#operationsView .ops-audit-status{
  padding:12px 14px;
  border-radius:10px;
  font-size:13px;
  color:var(--ops-muted,#64748b);
}

#operationsView .ops-audit-timeline{
  display:flex;
  flex-direction:column;
  gap:10px;
}

#operationsView .ops-audit-item{
  display:grid;
  grid-template-columns:54px minmax(0,1fr);
  gap:12px;
  padding:14px;
  border:1px solid var(--ops-border,#e2e8f0);
  border-radius:14px;
  background:var(--ops-surface,#fff);
}

#operationsView .ops-audit-icon{
  width:46px;
  height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  background:var(--ops-surface-2,#f1f5f9);
  font-size:20px;
}

#operationsView .ops-audit-item-main{
  min-width:0;
}

#operationsView .ops-audit-item-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

#operationsView .ops-audit-title{
  font-weight:900;
  font-size:14px;
  color:var(--ops-text,#0f172a);
}

#operationsView .ops-audit-time{
  white-space:nowrap;
  font-size:11px;
  color:var(--ops-muted,#64748b);
}

#operationsView .ops-audit-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  margin-top:7px;
}

#operationsView .ops-audit-chip{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:3px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  background:var(--ops-surface-2,#f1f5f9);
  color:var(--ops-text,#334155);
}

#operationsView .ops-audit-description{
  margin-top:9px;
  font-size:13px;
  line-height:1.7;
  color:var(--ops-muted,#475569);
}

#operationsView .ops-audit-details-btn{
  margin-top:10px;
  border:0;
  background:transparent;
  color:#2563eb;
  padding:0;
  cursor:pointer;
  font-size:12px;
  font-weight:900;
}

#operationsView .ops-audit-details{
  display:none;
  margin-top:10px;
  padding:12px;
  border-radius:10px;
  background:var(--ops-surface-2,#f8fafc);
  font-size:12px;
  line-height:1.8;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  color:var(--ops-text,#334155);
}

#operationsView .ops-audit-details.show{
  display:block;
}


/* DARK MODE */
#operationsView[data-theme="dark"] .ops-audit-head h2,
#operationsView[data-theme="dark"] .ops-audit-title,
#operationsView[data-theme="dark"] .ops-audit-kpi strong{
  color:#f8fafc !important;
}

#operationsView[data-theme="dark"] .ops-audit-head p,
#operationsView[data-theme="dark"] .ops-audit-kpi span,
#operationsView[data-theme="dark"] .ops-audit-filter-group label,
#operationsView[data-theme="dark"] .ops-audit-time,
#operationsView[data-theme="dark"] .ops-audit-description,
#operationsView[data-theme="dark"] .ops-audit-status{
  color:#cbd5e1 !important;
}

#operationsView[data-theme="dark"] .ops-audit-item,
#operationsView[data-theme="dark"] .ops-audit-kpi,
#operationsView[data-theme="dark"] .ops-audit-toolbar,
#operationsView[data-theme="dark"] .ops-audit-refresh{
  background:#111827 !important;
  border-color:#334155 !important;
  color:#f8fafc !important;
}

#operationsView[data-theme="dark"] .ops-audit-icon,
#operationsView[data-theme="dark"] .ops-audit-chip,
#operationsView[data-theme="dark"] .ops-audit-details{
  background:#1e293b !important;
  color:#f8fafc !important;
}

#operationsView[data-theme="dark"] .ops-audit-filter-group select,
#operationsView[data-theme="dark"] .ops-audit-filter-group input{
  background:#0f172a !important;
  color:#f8fafc !important;
  border-color:#475569 !important;
}

#operationsView[data-theme="dark"] .ops-audit-filter-group input::placeholder{
  color:#94a3b8 !important;
}


/* LIGHT MODE */
#operationsView[data-theme="light"] .ops-audit-head h2,
#operationsView[data-theme="light"] .ops-audit-title,
#operationsView[data-theme="light"] .ops-audit-kpi strong{
  color:#0f172a !important;
}

#operationsView[data-theme="light"] .ops-audit-head p,
#operationsView[data-theme="light"] .ops-audit-kpi span,
#operationsView[data-theme="light"] .ops-audit-time,
#operationsView[data-theme="light"] .ops-audit-description{
  color:#475569 !important;
}


/* MOBILE */
@media(max-width:900px){

  #operationsView .ops-audit-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  #operationsView .ops-audit-toolbar{
    grid-template-columns:1fr 1fr;
  }

  #operationsView .ops-audit-search-wrap{
    grid-column:1/-1;
  }
}

@media(max-width:560px){

  #operationsView .ops-audit-head{
    flex-direction:column;
  }

  #operationsView .ops-audit-refresh{
    width:100%;
  }

  #operationsView .ops-audit-toolbar{
    grid-template-columns:1fr;
  }

  #operationsView .ops-audit-search-wrap{
    grid-column:auto;
  }

  #operationsView .ops-audit-item{
    grid-template-columns:42px minmax(0,1fr);
    padding:12px;
  }

  #operationsView .ops-audit-icon{
    width:38px;
    height:38px;
  }

  #operationsView .ops-audit-item-top{
    flex-direction:column;
  }
}


/* =========================================================
   AYAN OPERATIONS ANALYTICS DARK CONTRAST FIX V1
========================================================= */

/* Main text */
#operationsView[data-theme="dark"] #ops-analytics,
#operationsView[data-theme="dark"] #ops-analytics h1,
#operationsView[data-theme="dark"] #ops-analytics h2,
#operationsView[data-theme="dark"] #ops-analytics h3,
#operationsView[data-theme="dark"] #ops-analytics h4,
#operationsView[data-theme="dark"] #ops-analytics strong,
#operationsView[data-theme="dark"] #ops-analytics b{
  color:#f8fafc !important;
  -webkit-text-fill-color:#f8fafc !important;
}

/* Secondary text */
#operationsView[data-theme="dark"] #ops-analytics p,
#operationsView[data-theme="dark"] #ops-analytics small,
#operationsView[data-theme="dark"] #ops-analytics label,
#operationsView[data-theme="dark"] #ops-analytics .ops-muted{
  color:#cbd5e1 !important;
  -webkit-text-fill-color:#cbd5e1 !important;
  opacity:1 !important;
}

/* Cards / panels */
#operationsView[data-theme="dark"] #ops-analytics .ops-card,
#operationsView[data-theme="dark"] #ops-analytics .ops-panel,
#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-card,
#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-kpi{
  background:#111827 !important;
  color:#f8fafc !important;
  border-color:#334155 !important;
}

/* KPI numbers and labels */
#operationsView[data-theme="dark"] #ops-analytics [id*="Kpi"],
#operationsView[data-theme="dark"] #ops-analytics [class*="kpi"] strong,
#operationsView[data-theme="dark"] #ops-analytics [class*="Kpi"] strong{
  color:#f8fafc !important;
  -webkit-text-fill-color:#f8fafc !important;
}

#operationsView[data-theme="dark"] #ops-analytics [class*="kpi"] span,
#operationsView[data-theme="dark"] #ops-analytics [class*="kpi"] small{
  color:#cbd5e1 !important;
  -webkit-text-fill-color:#cbd5e1 !important;
}

/* Lists / rows */
#operationsView[data-theme="dark"] #ops-analytics li,
#operationsView[data-theme="dark"] #ops-analytics td{
  color:#f8fafc !important;
  -webkit-text-fill-color:#f8fafc !important;
}

#operationsView[data-theme="dark"] #ops-analytics th{
  color:#e2e8f0 !important;
  -webkit-text-fill-color:#e2e8f0 !important;
}

/* Controls */
#operationsView[data-theme="dark"] #ops-analytics select,
#operationsView[data-theme="dark"] #ops-analytics input,
#operationsView[data-theme="dark"] #ops-analytics button{
  color:#f8fafc !important;
  -webkit-text-fill-color:#f8fafc !important;
  border-color:#475569 !important;
}

#operationsView[data-theme="dark"] #ops-analytics select,
#operationsView[data-theme="dark"] #ops-analytics input{
  background:#0f172a !important;
}

#operationsView[data-theme="dark"] #ops-analytics option{
  background:#0f172a !important;
  color:#f8fafc !important;
}

/* Generic analytics blocks */
#operationsView[data-theme="dark"] #ops-analytics div{
  text-shadow:none !important;
}

/* Links / actionable text */
#operationsView[data-theme="dark"] #ops-analytics a{
  color:#93c5fd !important;
  -webkit-text-fill-color:#93c5fd !important;
}

/* Preserve warning / critical emphasis */
#operationsView[data-theme="dark"] #ops-analytics .danger,
#operationsView[data-theme="dark"] #ops-analytics .error{
  color:#fca5a5 !important;
  -webkit-text-fill-color:#fca5a5 !important;
}

#operationsView[data-theme="dark"] #ops-analytics .success{
  color:#86efac !important;
  -webkit-text-fill-color:#86efac !important;
}


/* =========================================================
   AYAN OPERATIONS ANALYTICS EXACT THEME FIX V2
========================================================= */

/* =========================
   DARK MODE
========================= */

#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-highlight,
#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-panel{
    background:#111827 !important;
    border-color:#334155 !important;
    color:#f8fafc !important;
}

/* Highlight cards */
#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-highlight span{
    color:#cbd5e1 !important;
    -webkit-text-fill-color:#cbd5e1 !important;
    opacity:1 !important;
}

#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-highlight strong{
    color:#f8fafc !important;
    -webkit-text-fill-color:#f8fafc !important;
    opacity:1 !important;
}

#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-highlight small{
    color:#94a3b8 !important;
    -webkit-text-fill-color:#94a3b8 !important;
    opacity:1 !important;
}


/* Panel headers */
#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-panel-head{
    background:#111827 !important;
    border-color:#334155 !important;
}

#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-panel-head h3{
    color:#f8fafc !important;
    -webkit-text-fill-color:#f8fafc !important;
    opacity:1 !important;
}


/* Lists */
#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-list{
    background:#111827 !important;
    color:#f8fafc !important;
}

#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-row{
    background:#111827 !important;
    color:#f8fafc !important;
    border-color:#334155 !important;
}

#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-row-main{
    color:#f8fafc !important;
}

#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-row-main strong{
    color:#f8fafc !important;
    -webkit-text-fill-color:#f8fafc !important;
    opacity:1 !important;
}

#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-row-main small{
    color:#94a3b8 !important;
    -webkit-text-fill-color:#94a3b8 !important;
    opacity:1 !important;
}


/* Count badge */
#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-count{
    background:#1e293b !important;
    color:#f8fafc !important;
    -webkit-text-fill-color:#f8fafc !important;
    border-color:#475569 !important;
    opacity:1 !important;
}


/* Empty/loading text */
#operationsView[data-theme="dark"] #ops-analytics .ops-analytics-list > div{
    color:#cbd5e1 !important;
    -webkit-text-fill-color:#cbd5e1 !important;
}


/* =========================
   LIGHT MODE
========================= */

#operationsView[data-theme="light"] #ops-analytics .ops-analytics-highlight,
#operationsView[data-theme="light"] #ops-analytics .ops-analytics-panel{
    background:#ffffff !important;
    border-color:#e2e8f0 !important;
    color:#0f172a !important;
}

#operationsView[data-theme="light"] #ops-analytics .ops-analytics-highlight span{
    color:#64748b !important;
    -webkit-text-fill-color:#64748b !important;
}

#operationsView[data-theme="light"] #ops-analytics .ops-analytics-highlight strong{
    color:#0f172a !important;
    -webkit-text-fill-color:#0f172a !important;
}

#operationsView[data-theme="light"] #ops-analytics .ops-analytics-highlight small{
    color:#64748b !important;
    -webkit-text-fill-color:#64748b !important;
}

#operationsView[data-theme="light"] #ops-analytics .ops-analytics-panel-head{
    background:#ffffff !important;
    border-color:#e2e8f0 !important;
}

#operationsView[data-theme="light"] #ops-analytics .ops-analytics-panel-head h3{
    color:#0f172a !important;
    -webkit-text-fill-color:#0f172a !important;
}

#operationsView[data-theme="light"] #ops-analytics .ops-analytics-list,
#operationsView[data-theme="light"] #ops-analytics .ops-analytics-row{
    background:#ffffff !important;
    color:#0f172a !important;
}

#operationsView[data-theme="light"] #ops-analytics .ops-analytics-row{
    border-color:#e2e8f0 !important;
}

#operationsView[data-theme="light"] #ops-analytics .ops-analytics-row-main strong{
    color:#0f172a !important;
    -webkit-text-fill-color:#0f172a !important;
}

#operationsView[data-theme="light"] #ops-analytics .ops-analytics-row-main small{
    color:#64748b !important;
    -webkit-text-fill-color:#64748b !important;
}

#operationsView[data-theme="light"] #ops-analytics .ops-analytics-count{
    background:#f1f5f9 !important;
    color:#0f172a !important;
    -webkit-text-fill-color:#0f172a !important;
}


/* =========================================================
   AYAN OPERATIONS NOTIFICATIONS CENTER UI V2
========================================================= */

#operationsView .ops-notify-page{
  display:flex;
  flex-direction:column;
  gap:16px;
}

#operationsView .ops-notify-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

#operationsView .ops-notify-head h2{
  margin:0 0 6px;
  font-size:22px;
}

#operationsView .ops-notify-head p{
  margin:0;
  color:#64748b;
  font-size:13px;
  line-height:1.7;
}

#operationsView .ops-notify-head-actions{
  display:flex;
  gap:8px;
}

#operationsView .ops-notify-refresh-btn,
#operationsView .ops-notify-secondary-btn{
  min-height:40px;
  padding:8px 13px;
  border-radius:10px;
  border:1px solid #cbd5e1;
  cursor:pointer;
  font-weight:800;
  background:#fff;
  color:#0f172a;
}

#operationsView .ops-notify-refresh-btn{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
}


/* SUMMARY */

#operationsView .ops-notify-summary{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
}

#operationsView .ops-notify-summary-card{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:14px;
}

#operationsView .ops-notify-summary-card span{
  display:block;
  color:#64748b;
  font-size:11px;
  margin-bottom:6px;
}

#operationsView .ops-notify-summary-card strong{
  color:#0f172a;
  font-size:22px;
}


/* TABS */

#operationsView .ops-notify-tabs{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
}

#operationsView .ops-notify-tabs button{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:38px;
  padding:7px 11px;
  border-radius:10px;
  border:1px solid #cbd5e1;
  background:#fff;
  color:#334155;
  cursor:pointer;
  font-weight:800;
}

#operationsView .ops-notify-tabs button span{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 5px;
  border-radius:999px;
  background:#e2e8f0;
  color:#0f172a;
  font-size:10px;
}

#operationsView .ops-notify-tabs button.active{
  background:#2563eb;
  border-color:#2563eb;
  color:#fff;
}

#operationsView .ops-notify-tabs button.active span{
  background:rgba(255,255,255,.18);
  color:#fff;
}


/* TOOLBAR */

#operationsView .ops-notify-toolbar{
  display:grid;
  grid-template-columns:minmax(200px,1fr) 190px;
  gap:10px;
}

#operationsView .ops-notify-toolbar input,
#operationsView .ops-notify-toolbar select{
  width:100%;
  min-height:42px;
  box-sizing:border-box;
  padding:8px 11px;
  border-radius:10px;
  border:1px solid #cbd5e1;
  background:#fff;
  color:#0f172a;
  outline:none;
}


/* STATUS */

#operationsView .ops-notify-status{
  min-height:18px;
  color:#64748b;
  font-size:12px;
}


/* LIST */

#operationsView .ops-notify-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

#operationsView .ops-notify-item{
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  gap:12px;
  align-items:flex-start;
  padding:14px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  position:relative;
}

#operationsView .ops-notify-item.unread{
  border-right:4px solid #2563eb;
  background:#f8fbff;
}

#operationsView .ops-notify-icon{
  width:44px;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  background:#f1f5f9;
  font-size:20px;
}

#operationsView .ops-notify-content{
  min-width:0;
}

#operationsView .ops-notify-title-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
}

#operationsView .ops-notify-title{
  color:#0f172a;
  font-weight:900;
  font-size:14px;
}

#operationsView .ops-notify-body{
  margin-top:5px;
  color:#475569;
  font-size:13px;
  line-height:1.7;
}

#operationsView .ops-notify-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:9px;
}

#operationsView .ops-notify-chip{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border-radius:999px;
  background:#f1f5f9;
  color:#475569;
  font-size:10px;
  font-weight:800;
}

#operationsView .ops-notify-priority{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
}

#operationsView .ops-notify-priority.critical{
  background:#fee2e2;
  color:#991b1b;
}

#operationsView .ops-notify-priority.action{
  background:#fef3c7;
  color:#92400e;
}

#operationsView .ops-notify-priority.info{
  background:#dbeafe;
  color:#1e40af;
}

#operationsView .ops-notify-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:7px;
}

#operationsView .ops-notify-time{
  font-size:10px;
  color:#64748b;
  white-space:nowrap;
}

#operationsView .ops-notify-open-btn,
#operationsView .ops-notify-read-btn{
  border-radius:9px;
  min-height:34px;
  padding:6px 10px;
  font-weight:800;
  cursor:pointer;
  font-size:11px;
}

#operationsView .ops-notify-open-btn{
  background:#2563eb;
  color:#fff;
  border:1px solid #2563eb;
}

#operationsView .ops-notify-read-btn{
  background:#fff;
  color:#334155;
  border:1px solid #cbd5e1;
}

#operationsView .ops-notify-empty{
  padding:40px 15px;
  text-align:center;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  color:#64748b;
}


/* =========================================================
   DARK MODE
========================================================= */

#operationsView[data-theme="dark"] .ops-notify-head h2{
  color:#f8fafc !important;
}

#operationsView[data-theme="dark"] .ops-notify-head p,
#operationsView[data-theme="dark"] .ops-notify-status{
  color:#cbd5e1 !important;
}

#operationsView[data-theme="dark"] .ops-notify-summary-card,
#operationsView[data-theme="dark"] .ops-notify-item{
  background:#111827 !important;
  border-color:#334155 !important;
}

#operationsView[data-theme="dark"] .ops-notify-item.unread{
  background:#111d30 !important;
  border-right-color:#60a5fa !important;
}

#operationsView[data-theme="dark"] .ops-notify-summary-card span{
  color:#94a3b8 !important;
}

#operationsView[data-theme="dark"] .ops-notify-summary-card strong,
#operationsView[data-theme="dark"] .ops-notify-title{
  color:#f8fafc !important;
  -webkit-text-fill-color:#f8fafc !important;
}

#operationsView[data-theme="dark"] .ops-notify-body{
  color:#cbd5e1 !important;
  -webkit-text-fill-color:#cbd5e1 !important;
}

#operationsView[data-theme="dark"] .ops-notify-icon,
#operationsView[data-theme="dark"] .ops-notify-chip{
  background:#1e293b !important;
  color:#e2e8f0 !important;
}

#operationsView[data-theme="dark"] .ops-notify-time{
  color:#94a3b8 !important;
}

#operationsView[data-theme="dark"] .ops-notify-tabs button,
#operationsView[data-theme="dark"] .ops-notify-secondary-btn,
#operationsView[data-theme="dark"] .ops-notify-read-btn{
  background:#1e293b !important;
  border-color:#475569 !important;
  color:#f8fafc !important;
  -webkit-text-fill-color:#f8fafc !important;
}

#operationsView[data-theme="dark"] .ops-notify-tabs button span{
  background:#334155 !important;
  color:#f8fafc !important;
}

#operationsView[data-theme="dark"] .ops-notify-tabs button.active{
  background:#2563eb !important;
  color:#fff !important;
}

#operationsView[data-theme="dark"] .ops-notify-tabs button.active span{
  background:rgba(255,255,255,.18) !important;
  color:#fff !important;
}

#operationsView[data-theme="dark"] .ops-notify-toolbar input,
#operationsView[data-theme="dark"] .ops-notify-toolbar select{
  background:#0f172a !important;
  border-color:#475569 !important;
  color:#f8fafc !important;
}

#operationsView[data-theme="dark"] .ops-notify-toolbar input::placeholder{
  color:#94a3b8 !important;
}

#operationsView[data-theme="dark"] .ops-notify-empty{
  border-color:#475569 !important;
  color:#cbd5e1 !important;
}


/* MOBILE */

@media(max-width:900px){

  #operationsView .ops-notify-summary{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

}

@media(max-width:620px){

  #operationsView .ops-notify-head{
    flex-direction:column;
  }

  #operationsView .ops-notify-head-actions{
    width:100%;
  }

  #operationsView .ops-notify-head-actions button{
    flex:1;
  }

  #operationsView .ops-notify-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  #operationsView .ops-notify-toolbar{
    grid-template-columns:1fr;
  }

  #operationsView .ops-notify-tabs{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:3px;
  }

  #operationsView .ops-notify-tabs button{
    flex:0 0 auto;
  }

  #operationsView .ops-notify-item{
    grid-template-columns:42px minmax(0,1fr);
  }

  #operationsView .ops-notify-icon{
    width:38px;
    height:38px;
  }

  #operationsView .ops-notify-actions{
    grid-column:2;
    flex-direction:row;
    align-items:center;
    justify-content:flex-start;
    flex-wrap:wrap;
  }

}


/* =========================================================
   AYAN OPERATIONS MOBILE UX V4
========================================================= */

@media(max-width:768px){

  /* ===== ROOT ===== */

  #operationsView{
    overflow-x:hidden !important;
  }

  #operationsView .ops-shell{
    display:block !important;
    min-height:100vh;
  }

  #operationsView .ops-main{
    width:100%;
    min-width:0 !important;
  }

  #operationsView .ops-content{
    padding:10px !important;
  }


  /* ===== TOP NAV ===== */

  #operationsView .ops-sidebar{
    position:relative !important;
    top:auto !important;
    min-height:auto !important;
    height:auto !important;
    padding:10px !important;
  }

  #operationsView .ops-brand{
    margin-bottom:10px !important;
  }

  #operationsView .ops-logo{
    width:36px !important;
    height:36px !important;
  }

  #operationsView .ops-brand strong{
    font-size:14px !important;
  }

  #operationsView .ops-brand small{
    font-size:10px !important;
  }

  #operationsView .ops-nav{
    display:flex !important;
    flex-direction:row !important;
    gap:6px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    padding:2px 0 6px !important;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }

  #operationsView .ops-nav::-webkit-scrollbar{
    display:none;
  }

  #operationsView .ops-nav button{
    flex:0 0 auto !important;
    width:auto !important;
    min-width:max-content !important;
    min-height:38px !important;
    padding:8px 11px !important;
    font-size:12px !important;
    border-radius:9px !important;
    scroll-snap-align:start;
  }


  /* ===== HEADER ===== */

  #operationsView .ops-header{
    position:sticky !important;
    top:0 !important;
    z-index:90 !important;
    padding:10px !important;
    gap:8px !important;
    flex-wrap:wrap !important;
  }

  #operationsView .ops-header-title{
    flex:1 1 auto;
    min-width:140px;
  }

  #operationsView .ops-header-title strong{
    font-size:15px !important;
  }

  #operationsView .ops-header-title small{
    font-size:10px !important;
  }

  #operationsView .ops-header-actions{
    width:100% !important;
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:6px !important;
  }

  #operationsView .ops-header-actions > *{
    min-width:0 !important;
  }

  #operationsView .ops-header-actions button{
    min-height:38px !important;
    width:100% !important;
    padding:7px 8px !important;
    font-size:11px !important;
  }


  /* ===== MODULE HEADERS ===== */

  #operationsView .ops-module-head,
  #operationsView .ops-analytics-head,
  #operationsView .ops-calendar-head,
  #operationsView .ops-audit-head,
  #operationsView .ops-notify-head{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px !important;
  }

  #operationsView .ops-module-head > div,
  #operationsView .ops-analytics-head > div,
  #operationsView .ops-calendar-head > div,
  #operationsView .ops-audit-head > div,
  #operationsView .ops-notify-head > div{
    width:100% !important;
  }

  #operationsView .ops-primary-btn,
  #operationsView .ops-audit-refresh,
  #operationsView .ops-notify-head-actions{
    width:100% !important;
  }


  /* ===== KPI GRIDS ===== */

  #operationsView .ops-kpis,
  #operationsView .ops-analytics-kpis,
  #operationsView .ops-calendar-kpis,
  #operationsView .ops-audit-kpis,
  #operationsView .ops-notify-summary{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
  }

  #operationsView .ops-card,
  #operationsView .ops-analytics-card,
  #operationsView .ops-calendar-kpis > div,
  #operationsView .ops-audit-kpi,
  #operationsView .ops-notify-summary-card{
    padding:12px !important;
    border-radius:12px !important;
  }


  /* ===== TABLES -> MOBILE CARDS ===== */

  #operationsView .ops-table-wrap{
    overflow:visible !important;
  }

  #operationsView .ops-table,
  #operationsView #ops-tasks table{
    min-width:0 !important;
    width:100% !important;
    border-collapse:separate !important;
  }

  #operationsView .ops-table thead,
  #operationsView #ops-tasks table thead{
    display:none !important;
  }

  #operationsView .ops-table tbody,
  #operationsView #ops-tasks table tbody{
    display:flex !important;
    flex-direction:column !important;
    gap:10px !important;
  }

  #operationsView .ops-table tr,
  #operationsView #ops-tasks table tr{
    display:block !important;
    border:1px solid var(--ops-border,#e2e8f0) !important;
    background:var(--ops-surface,#fff) !important;
    border-radius:14px !important;
    padding:10px !important;
    box-shadow:0 2px 7px rgba(15,23,42,.04);
  }

  #operationsView .ops-table td,
  #operationsView #ops-tasks table td{
    display:grid !important;
    grid-template-columns:110px minmax(0,1fr) !important;
    align-items:start !important;
    gap:8px !important;
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    padding:8px 4px !important;
    border:0 !important;
    border-bottom:1px solid var(--ops-border,#eef2f7) !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }

  #operationsView .ops-table td:last-child,
  #operationsView #ops-tasks table td:last-child{
    border-bottom:0 !important;
  }

  #operationsView .ops-table td::before,
  #operationsView #ops-tasks table td::before{
    content:attr(data-label);
    font-weight:800;
    font-size:11px;
    color:var(--ops-muted,#64748b);
  }

  #operationsView .ops-actions-cell{
    display:block !important;
    min-width:0 !important;
    width:100% !important;
  }

  #operationsView .ops-actions-cell::before{
    display:block !important;
    margin-bottom:8px;
  }

  #operationsView .ops-actions-cell > div{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:7px !important;
  }

  #operationsView .ops-action-btn,
  #operationsView .ops-maintenance-workflow-open-btn{
    width:100% !important;
    min-height:40px !important;
    padding:7px 8px !important;
    font-size:11px !important;
    white-space:normal !important;
  }


  /* ===== ANALYTICS ===== */

  #operationsView .ops-analytics-highlight-grid,
  #operationsView .ops-analytics-grid{
    grid-template-columns:1fr !important;
  }

  #operationsView .ops-analytics-filters{
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
  }

  #operationsView .ops-analytics-filters select,
  #operationsView .ops-analytics-filters button{
    width:100% !important;
  }


  /* ===== CALENDAR ===== */

  #operationsView .ops-calendar-controls{
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
  }

  #operationsView .ops-calendar-controls strong{
    grid-column:1/-1;
    order:-1;
    min-width:0 !important;
  }

  #operationsView .ops-calendar-filter{
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    padding-bottom:4px;
  }

  #operationsView .ops-calendar-filter button{
    flex:0 0 auto !important;
  }

  #operationsView .ops-calendar-event{
    grid-template-columns:72px minmax(0,1fr) !important;
    gap:8px !important;
    padding:10px !important;
  }

  #operationsView .ops-calendar-event-type{
    grid-column:2 !important;
  }


  /* ===== AUDIT ===== */

  #operationsView .ops-audit-toolbar{
    grid-template-columns:1fr !important;
    padding:10px !important;
  }

  #operationsView .ops-audit-search-wrap{
    grid-column:auto !important;
  }

  #operationsView .ops-audit-item{
    grid-template-columns:40px minmax(0,1fr) !important;
    padding:10px !important;
  }

  #operationsView .ops-audit-item-top{
    flex-direction:column !important;
    gap:3px !important;
  }


  /* ===== NOTIFICATIONS ===== */

  #operationsView .ops-notify-head-actions{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:7px !important;
  }

  #operationsView .ops-notify-tabs{
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    scrollbar-width:none;
  }

  #operationsView .ops-notify-tabs::-webkit-scrollbar{
    display:none;
  }

  #operationsView .ops-notify-tabs button{
    flex:0 0 auto !important;
  }

  #operationsView .ops-notify-toolbar{
    grid-template-columns:1fr !important;
  }

  #operationsView .ops-notify-item{
    grid-template-columns:38px minmax(0,1fr) !important;
    padding:10px !important;
  }

  #operationsView .ops-notify-actions{
    grid-column:2 !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    width:100% !important;
  }

  #operationsView .ops-notify-time{
    grid-column:1/-1;
  }


  /* ===== MODALS ===== */

  .ops-modal-backdrop,
  #opsCrudModal,
  #opsLicenseReviewModal{
    padding:0 !important;
    align-items:flex-end !important;
  }

  .ops-modal-box,
  .ops-crud-card,
  .ops-license-review-card{
    width:100% !important;
    max-width:none !important;
    max-height:92vh !important;
    border-radius:20px 20px 0 0 !important;
    overflow-y:auto !important;
  }

  .ops-form-grid,
  .ops-form-grid-2,
  .ops-crud-grid{
    grid-template-columns:1fr !important;
  }

  .ops-modal-head,
  .ops-crud-head{
    position:sticky !important;
    top:0;
    z-index:3;
  }


  /* ===== G ASSISTANT ===== */

  .ops-global-g{
    left:10px !important;
    bottom:10px !important;
  }

  .ops-global-g-panel{
    left:6px !important;
    right:6px !important;
    bottom:6px !important;
    width:auto !important;
    height:78vh !important;
    max-height:720px !important;
    border-radius:18px !important;
  }

}


@media(max-width:420px){

  #operationsView .ops-header-actions{
    grid-template-columns:1fr 1fr !important;
  }

  #operationsView .ops-kpis,
  #operationsView .ops-analytics-kpis,
  #operationsView .ops-calendar-kpis,
  #operationsView .ops-audit-kpis,
  #operationsView .ops-notify-summary{
    grid-template-columns:1fr 1fr !important;
  }

  #operationsView .ops-table td,
  #operationsView #ops-tasks table td{
    grid-template-columns:92px minmax(0,1fr) !important;
  }

  #operationsView .ops-actions-cell > div{
    grid-template-columns:1fr !important;
  }

}

/* ---- source style block #ayanOperationsArchiveStyle ---- */
.ops-archive-switch{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:0 0 16px;
  padding:6px;
  border:1px solid rgba(148,163,184,.25);
  border-radius:15px;
  background:rgba(248,250,252,.85);
}

.ops-archive-switch button{
  border:0;
  border-radius:11px;
  padding:9px 15px;
  font:inherit;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
  background:transparent;
  color:#475569;
  transition:.2s ease;
}

.ops-archive-switch button:hover{
  background:#e2e8f0;
}

.ops-archive-switch button.active{
  background:#0f766e;
  color:#fff;
  box-shadow:0 5px 14px rgba(15,118,110,.18);
}

.ops-archive-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  margin-inline-start:5px;
  padding:0 6px;
  border-radius:999px;
  background:rgba(255,255,255,.22);
  font-size:11px;
}

.ops-project-archive{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:14px 0 18px;
}

.ops-project-folder{
  position:relative;
  overflow:hidden;
  border:1px solid #dbe3ec;
  border-radius:16px;
  background:#fff;
  padding:15px;
  cursor:pointer;
  transition:.2s ease;
  text-align:right;
  color:#0f172a;
}

.ops-project-folder:hover{
  transform:translateY(-2px);
  border-color:#0f766e;
  box-shadow:0 10px 25px rgba(15,23,42,.08);
}

.ops-project-folder.active{
  border-color:#0f766e;
  box-shadow:0 0 0 2px rgba(15,118,110,.10);
}

.ops-project-folder strong{
  display:block;
  font-size:15px;
  margin-bottom:5px;
}

.ops-project-folder span{
  font-size:12px;
  color:#64748b;
}

.ops-project-folder .folder-icon{
  font-size:22px;
  margin-bottom:8px;
}

.ops-archive-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin:0 0 14px;
}

.ops-archive-title{
  font-weight:900;
  color:#0f172a;
}

.ops-archive-add{
  border:0;
  border-radius:11px;
  padding:9px 13px;
  background:#0f766e;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

body.theme-light .ops-archive-switch{
  background:rgba(248,250,252,.9);
}

body:not(.theme-light) .ops-archive-switch{
  background:rgba(15,23,42,.7);
  border-color:#334155;
}

body:not(.theme-light) .ops-archive-switch button{
  color:#cbd5e1;
}

body:not(.theme-light) .ops-project-folder{
  background:#111827;
  color:#f8fafc;
  border-color:#334155;
}

body:not(.theme-light) .ops-project-folder span{
  color:#94a3b8;
}

body:not(.theme-light) .ops-archive-title{
  color:#f8fafc;
}

@media(max-width:850px){
  .ops-project-archive{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:520px){

  .ops-archive-switch{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }

  .ops-archive-switch button{
    width:100%;
    padding:9px 6px;
    font-size:12px;
  }

  .ops-project-archive{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }

  .ops-project-folder{
    padding:11px;
    border-radius:13px;
  }

  .ops-project-folder strong{
    font-size:13px;
  }

}

/* ---- source style block #ayanGlobalGPlatformStyle ---- */
  /* Use ONE G button across the whole platform */
  #execGlobalGButton{
    display:none !important;
  }

  #opsGlobalG{
    display:block !important;
    position:fixed !important;
    left:18px !important;
    right:auto !important;
    bottom:18px !important;
    z-index:9000 !important;
  }

  /* Executive return stays on the opposite side */
  #ayanExecutiveReturnBtn,
  .ayan-exec-return{
    right:18px !important;
    left:auto !important;
    bottom:18px !important;
  }

  /* Platform identity */
  #opsGlobalGButton{
    transition:
      transform .2s ease,
      filter .2s ease,
      box-shadow .2s ease;
  }

  #opsGlobalGButton:hover{
    transform:translateY(-3px) scale(1.02);
    filter:brightness(1.06);
  }

  #opsGlobalGPanel{
    max-height:min(720px,82vh);
  }

  @media(max-width:700px){

    #opsGlobalG{
      left:10px !important;
      bottom:10px !important;
    }

    #ayanExecutiveReturnBtn,
    .ayan-exec-return{
      right:10px !important;
      left:auto !important;
      bottom:10px !important;
    }

  }

/* ---- source style block ---- */
/* AYAN OPS-ONLY USER CONTROLS V1 */

#operationsView .ops-only-logout-btn{
  white-space:nowrap;
}

@media(max-width:700px){

  #operationsView .ops-only-logout-btn{
    min-width:auto !important;
    padding:9px 12px !important;
    font-size:12px !important;
  }

}
