/* SES Horizon Premium V2: visual layer, mobile-first, no changes to project logic. */
:root{
  --h2-blue:#0958af;--h2-blue-light:#e4f2ff;--h2-blue-strong:#064aab;
  --h2-gold:#ffc942;--h2-gold-edge:#ca8d0a;--h2-ink:#092b59;
  --h2-shadow:0 15px 30px rgba(10,60,122,.21),0 4px 8px rgba(10,60,122,.13);
  --h2-inset:inset 0 3px 2px rgba(255,255,255,.92),inset 0 -3px 4px rgba(35,112,184,.11);
}
html{background:#e8f4ff!important}
body{
  background:linear-gradient(180deg,rgba(227,244,255,.03) 0%,rgba(231,245,255,.57) 27%,rgba(235,247,255,.90) 70%,rgba(239,247,255,.95) 100%),url('ses-horizon-sunrise-v2.webp') center top / cover fixed no-repeat!important;
  color:var(--h2-ink)!important;
}
#appShell,#sesWebRoot,#sesWebRoot .ses-workspace{background:transparent!important}
#sesWebRoot{color:var(--h2-ink)!important}
#sesWebRoot .ses-workspace{background:linear-gradient(155deg,rgba(238,248,255,.21),rgba(229,243,255,.50))!important}
#sesWebRoot main.container{background:transparent!important;backdrop-filter:none!important;padding-top:22px!important}
/* Restore the original SES logo and let the landscape be visible behind the page. */
#sesWebRoot .ses-page-head{
  background:linear-gradient(100deg,rgba(6,41,105,.15),rgba(5,63,138,.50)),url('ses-horizon-sunrise-v2.webp') center 42%/cover no-repeat!important;
  border-bottom:4px solid #f6c550!important;
  min-height:205px!important;
  box-shadow:inset 0 5px 9px rgba(255,255,255,.20),0 12px 30px rgba(6,69,135,.29)!important;
}
#sesWebRoot .ses-page-head:after{display:none!important}
#sesWebRoot .ses-page-head .ses-head-kicker{color:#ffdf8b!important;text-shadow:0 2px 4px #0c376e!important}
#sesWebRoot .ses-page-head h1{color:white!important;text-shadow:0 3px 13px #082a59,0 1px 2px #0c2c58!important;font-weight:900!important;font-size:clamp(25px,2.5vw,36px)!important}
#sesWebRoot .ses-page-head p{color:#f8fbff!important;text-shadow:0 2px 6px #042c5c!important;font-weight:800!important}
#sesWebRoot .ses-h2-identity{display:flex;justify-content:flex-start;align-items:center;gap:11px;margin:0 0 15px;position:relative;z-index:1}
#sesWebRoot .ses-h2-identity img{width:77px;height:62px;object-fit:contain;border-radius:14px;background:rgba(255,255,255,.94);padding:5px;box-shadow:0 8px 19px #062e6577,inset 0 1px 0 #fff}
#sesWebRoot .ses-h2-identity strong{display:block;color:white;font-size:clamp(15px,2vw,22px);text-shadow:0 3px 8px #06355e}
#sesWebRoot .ses-h2-identity small{color:#ffe6a9;font-weight:900;letter-spacing:.4px}
/* Shell and sidebar: 3D pearlescent light panels, crisp blue icons, gold active item. */
#sesWebRoot .ses-sidebar{
  background:linear-gradient(160deg,rgba(255,255,255,.98),rgba(231,242,255,.97) 63%,rgba(223,237,255,.99))!important;
  border-left:3px solid #d5a735!important;
  box-shadow:-10px 0 25px rgba(5,56,123,.19),inset 2px 0 3px rgba(255,255,255,.9)!important;
}
#sesWebRoot .ses-brand{background:linear-gradient(145deg,#fff,#e9f5ff)!important;border-bottom:2px solid #bdd8f4!important}
#sesWebRoot .ses-brand strong{color:#083b86!important}
#sesWebRoot .ses-brand small{color:#986700!important}
#sesWebRoot .ses-brand img{border:1px solid #c9dff8!important;box-shadow:0 7px 12px #15589830!important}
#sesWebRoot .ses-nav button{color:#12467e!important;border:1px solid transparent!important;border-radius:14px!important;min-height:48px!important;font-weight:900!important}
#sesWebRoot .ses-nav button svg{color:#0960b4!important;stroke-width:2.3!important}
#sesWebRoot .ses-nav button:hover{background:linear-gradient(130deg,#eff8ff,#dceeff)!important;border-color:#bedafb!important}
#sesWebRoot .ses-nav button.active{
  background:linear-gradient(175deg,#fff0b4 0%,#ffd15a 43%,#eea918 100%)!important;
  color:#133b72!important;border:2px solid #be870b!important;
  box-shadow:inset 0 2px 3px #fff8cf,0 7px 13px #976a2b59!important;
  text-shadow:0 1px 0 #fff0b5!important;
}
#sesWebRoot .ses-nav button.active svg{color:#083f80!important}
#sesWebRoot .ses-side-foot{background:linear-gradient(145deg,#f7fbff,#dcecff)!important;border-top:2px solid #d7ad3c!important}
#sesWebRoot .ses-side-foot strong,#sesWebRoot .ses-side-foot span{color:#173f7a!important}
#sesWebRoot .ses-side-foot button{color:#093e82!important;background:linear-gradient(155deg,#fff,#e5f0fc)!important;box-shadow:var(--h2-inset),0 5px 12px #0b4a952e!important}
/* Top controls retain all current events and permissions. */
#sesWebRoot .top-header{background:linear-gradient(115deg,rgba(255,255,255,.97),rgba(232,244,255,.97))!important;border-bottom:2px solid #d7a737!important;box-shadow:0 5px 17px #0758a62d!important}
#sesWebRoot .top-header .header-actions .btn-pill,#sesWebRoot #currentUserBadge,#sesWebRoot .ses-menu-toggle,#sesWebProjectSelect{
  background:linear-gradient(150deg,#fff,#e6f2ff)!important;
  border:1.5px solid #accff2!important;color:#114985!important;
  border-radius:14px!important;box-shadow:var(--h2-inset),0 4px 11px #0c509933!important;
}
#sesWebRoot .top-header #syncStatus{background:linear-gradient(#e9fff2,#b9f6d5)!important;color:#086842!important;border:1px solid #70cb9a!important;box-shadow:0 3px 8px #0c8a4635!important}
#sesWebRoot .ses-menu-toggle{min-height:46px!important;font-size:14px!important}
#sesWebRoot .ses-top-picker label{color:#0b4d8d!important}
/* Big, readable 3D white and pearl cards. */
#sesWebRoot :is(.ses-web-card,.ses-mini-task,.ses-action-card,.ses-horizon-table-card,.ses-kpi,.ses-horizon-metric,.ses-fact,.ses-current-info>div,.ses-web-card>.ses-action-grid>div){
  color:#123b6d!important;
  background:linear-gradient(150deg,#ffffff 2%,#f0f7ff 48%,#dfecff 100%)!important;
  border:1.5px solid #b7d3f2!important;border-bottom:3px solid #a7c5e9!important;
  border-radius:21px!important;
  box-shadow:var(--h2-inset),var(--h2-shadow)!important;
}
#sesWebRoot .ses-web-card h3,#sesWebRoot .ses-section-intro h2{color:#073f84!important;font-weight:900!important}
#sesWebRoot .ses-section-intro p,#sesWebRoot :is(.ses-mini-task small,.ses-web-card p,.ses-kpi small,.ses-horizon-metric small,.ses-horizon-metric em){color:#3d5878!important;opacity:1!important}
#sesWebRoot :is(.ses-kpi,.ses-horizon-metric) strong{color:#064c9c!important;text-shadow:0 1px 0 #fff!important}
#sesWebRoot :is(.ses-kpi.green,.ses-horizon-metric.green) strong{color:#098048!important}
#sesWebRoot :is(.ses-kpi.gold,.ses-horizon-metric.gold) strong{color:#b17600!important}
#sesWebRoot .dashboard-welcome{
  background:linear-gradient(95deg,rgba(9,66,142,.28),rgba(5,49,128,.74)),url('ses-horizon-sunrise-v2.webp') center 47%/cover no-repeat!important;
  border:2.5px solid #ffd274!important;box-shadow:0 15px 30px #07509644,inset 0 2px 0 #ffffff99!important;
  min-height:160px;
}
#sesWebRoot .dashboard-welcome h2{font-size:clamp(21px,2.4vw,31px)!important}
#sesWebRoot .dashboard-welcome :is(h2,h3,strong,p){color:white!important;text-shadow:0 3px 9px #062f67!important}
/* Premium 3D buttons, always high contrast. */
#sesWebRoot :is(.ses-mini-task button,.ses-action-card button,.ses-phase-action,.ses-horizon-table button,.btn-pill.gold,.ses-h2-shortcut.active){
  background:linear-gradient(180deg,#fff0ac 0%,#ffce56 35%,#eaa00d 100%)!important;
  color:#153457!important;border:1.5px solid #c88b13!important;border-radius:14px!important;
  box-shadow:inset 0 3px 2px #fff8d5,0 7px 13px #a97a1f64!important;
  font-weight:900!important;text-shadow:0 1px 0 #ffedac!important;
  min-height:44px;
}
#sesWebRoot button:focus-visible,#sesWebRoot select:focus-visible,#sesWebRoot a:focus-visible{outline:3px solid #ffa826!important;outline-offset:3px!important}
#sesWebRoot button:active{transform:translateY(1px)}
#sesWebRoot .ses-mini-task.red{border-inline-start:4px solid #c43c3b!important}
#sesWebRoot .ses-mini-task.amber{border-inline-start:4px solid #f0b537!important}
#sesWebRoot .ses-mini-task.blue{border-inline-start:4px solid #3988db!important}
#sesWebRoot .ses-mini-task strong{color:#163c73!important;font-size:14px!important}
/* Financial summary headers & project table. */
#sesWebRoot .ses-horizon-home-finance h3,#sesWebRoot .ses-horizon-table-card h3{
  background:linear-gradient(120deg,#0c64bd,#064485)!important;color:#fff!important;
  border-radius:14px;padding:12px 15px;margin:0 0 13px!important;
  font-size:17px!important;box-shadow:inset 0 2px 0 #78baffc4,0 5px 10px #094f9c33!important;
}
#sesWebRoot .ses-horizon-grid{gap:13px!important}
#sesWebRoot .ses-horizon-metric{padding:17px!important}
#sesWebRoot .ses-horizon-metric small{font-size:12px!important}
#sesWebRoot .ses-horizon-metric strong{font-size:clamp(20px,2vw,30px)!important}
#sesWebRoot .ses-horizon-table-card{padding:16px!important}
#sesWebRoot .ses-horizon-table{border-collapse:separate!important;border-spacing:0 5px!important}
#sesWebRoot .ses-horizon-table th{background:linear-gradient(180deg,#0e6bc5,#074783)!important;color:white!important;padding:13px 9px!important;font-weight:900!important}
#sesWebRoot .ses-horizon-table td{background:#f8fbff!important;color:#183d68!important;border-top:1px solid #dbebff!important;border-bottom:1px solid #d4e5f8!important;font-weight:800!important}
#sesWebRoot .ses-horizon-status{background:#c9e7ff!important;color:#0a5398!important}
#sesWebRoot .ses-horizon-status.done{background:#cef7da!important;color:#086341!important}
/* Tactile icon navigation to existing sections; 100% driven by authorized nav. */
#sesWebRoot .ses-h2-shortcuts{margin:14px 0 22px!important}
#sesWebRoot .ses-h2-shortcuts h3{background:linear-gradient(135deg,#0c65bf,#084587)!important;color:white!important;border-radius:13px;padding:12px 14px!important;font-size:16px!important;margin-bottom:12px!important}
#sesWebRoot .ses-h2-shortcut-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:11px}
#sesWebRoot .ses-h2-shortcut{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;
  min-width:0;min-height:96px;padding:12px 7px;
  color:#0b4689!important;background:linear-gradient(148deg,#fff,#ecf5ff 58%,#dceeff)!important;
  border:1.5px solid #a6c9ee!important;border-bottom:3px solid #8db9e7!important;
  border-radius:17px;box-shadow:var(--h2-inset),0 7px 15px #0c559633!important;
  font-family:inherit;font-size:12px;line-height:1.5;font-weight:900;cursor:pointer;
}
#sesWebRoot .ses-h2-shortcut svg{display:block;width:30px;height:30px;fill:none;stroke:#0764c5;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 2px 2px #3e8dd555)}
#sesWebRoot .ses-h2-shortcut span{text-align:center}
#sesWebRoot .ses-h2-shortcut:active{transform:translateY(2px);box-shadow:inset 0 2px 4px #478bd83d!important}
/* Visible text in legacy forms and dialogs. */
#sesWebRoot :is(.form-control,input,select,textarea){color:#13385d!important}
#sesWebRoot :is(.form-control,input,select,textarea)::placeholder{color:#56708a!important;opacity:1!important}
#sesWebRoot .ses-web-card :is(small,p),#sesWebRoot .card :is(small,p){opacity:1!important}
#sesWebRoot .ses-site-footer{background:linear-gradient(120deg,#0a5eb4,#062c6f)!important;color:#fff!important;border-top:3px solid #ffd071!important;box-shadow:inset 0 2px 0 #9bcaff!important}
/* Ensure touch-first layout on modern Android and iPhone screens. */
@media(max-width:920px){
  #sesWebRoot .ses-h2-shortcut-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
  body{background-attachment:scroll!important;background-position:40% top!important}
  #sesWebRoot{display:block!important}
  #sesWebRoot .ses-workspace{min-width:0!important;width:100%!important}
  #sesWebRoot main.container{padding:14px 13px 45px!important;max-width:100%!important}
  #sesWebRoot .ses-page-head{min-height:230px!important;padding:21px 20px 26px!important;background-position:36% center!important}
  #sesWebRoot .ses-page-head h1{font-size:27px!important}
  #sesWebRoot .ses-page-head p{font-size:14px!important}
  #sesWebRoot .ses-h2-identity img{width:71px;height:61px}
  #sesWebRoot .top-header .header-inner{padding:11px 12px!important}
  #sesWebRoot .top-header .header-actions .btn-pill,#sesWebRoot #currentUserBadge{min-height:42px!important}
  #sesWebRoot .ses-top-tools{gap:10px!important}
  #sesWebRoot .ses-top-picker{flex:1 1 150px!important}
  #sesWebProjectSelect{width:min(52vw,275px)!important;min-height:46px!important}
  #sesWebRoot .ses-sidebar{width:min(87vw,340px)!important}
  #sesWebRoot .dashboard-welcome{min-height:155px!important;background-position:36% center!important}
  #sesWebRoot .ses-web-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
  #sesWebRoot .ses-kpi{padding:12px 8px!important;border-radius:16px!important}
  #sesWebRoot .ses-kpi strong{font-size:clamp(14px,3.6vw,21px)!important;overflow-wrap:anywhere}
  #sesWebRoot .ses-kpi small{font-size:10px!important}
  #sesWebRoot .ses-horizon-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  #sesWebRoot .ses-horizon-metric{padding:12px 10px!important;min-height:110px}
  #sesWebRoot .ses-horizon-metric strong{font-size:clamp(17px,4.8vw,24px)!important}
  #sesWebRoot .ses-h2-shortcut-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px!important}
  #sesWebRoot .ses-h2-shortcut{font-size:11px;min-height:91px;padding:10px 5px}
  #sesWebRoot .ses-h2-shortcut svg{width:27px;height:27px}
  #sesWebRoot .ses-split{grid-template-columns:1fr!important}
  #sesWebRoot .ses-horizon-table-scroll{overflow:visible!important}
  #sesWebRoot .ses-horizon-table{display:block!important;min-width:0!important;width:100%!important}
  #sesWebRoot .ses-horizon-table thead{display:none!important}
  #sesWebRoot .ses-horizon-table tbody{display:grid!important;gap:10px!important}
  #sesWebRoot .ses-horizon-table tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 12px;padding:12px;
    border:1px solid #b5d5f3;border-radius:15px;background:linear-gradient(#fff,#eaf5ff);box-shadow:inset 0 2px 0 #fff,0 5px 12px #0c50932b}
  #sesWebRoot .ses-horizon-table td{display:flex!important;align-items:center;gap:5px;flex-wrap:wrap;min-width:0!important;padding:4px 0!important;
    border:0!important;background:transparent!important;font-size:12px!important;overflow-wrap:anywhere}
  #sesWebRoot .ses-horizon-table td:nth-child(1){grid-column:1/-1;color:#0d559e!important;font-weight:900!important}
  #sesWebRoot .ses-horizon-table td:nth-child(2){grid-column:1/-1}
  #sesWebRoot .ses-horizon-table td:nth-child(3)::before{content:'الحالة:';color:#355a82;font-size:11px}
  #sesWebRoot .ses-horizon-table td:nth-child(4)::before{content:'التقدم:';color:#355a82;font-size:11px}
  #sesWebRoot .ses-horizon-table td:nth-child(5){grid-column:1/-1}
  #sesWebRoot .ses-horizon-table td:nth-child(5) button{width:100%;min-height:42px}
  #sesWebRoot .ses-mini-task{flex-direction:row!important;align-items:center!important;flex-wrap:wrap!important;padding:12px!important;gap:8px!important}
  #sesWebRoot .ses-mini-task>div{flex:1 1 200px}
  #sesWebRoot .ses-mini-task button{width:auto!important;align-self:auto!important}
}
@media(max-width:370px){
  #sesWebRoot .ses-web-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #sesWebRoot .ses-web-kpis .ses-kpi:last-child{grid-column:1/-1!important}
  #sesWebRoot .ses-h2-shortcut{font-size:10px}
}
@media(prefers-reduced-motion:reduce){#sesWebRoot *{animation-duration:0.01ms!important;transition-duration:0.01ms!important}}
