/* SES Solar Pro Web V3 — desktop-first, responsive operational skin.
   All transactional forms and security gates remain in the V8.5.3 engine. */
:root {
  --ses-blue:#0e769f;--ses-blue-dark:#07506e;--ses-blue-light:#e5f4f9;
  --ses-gold:#f0b83a;--ses-gold-dark:#b67b10;--ses-gold-light:#fff6db;
  --ses-deep:#092c47;--ses-navy:#0e3d5e;--bg-main:#f2f6f8;--bg-card:#fff;
  --text-dark:#173448;--text-muted:#6a7e8c;--border-light:#dde8ed;
  --green:#0b946e;--green-light:#e9f8f1;--red:#bb3e54;--red-light:#fff0f2;
  --radius:18px;--shadow:0 12px 32px rgba(9,44,71,.055);
}
html{scroll-behavior:auto}body{background:#f1f6f8;color:var(--text-dark);padding-bottom:0!important;font-family:Tahoma,"Segoe UI",Arial,sans-serif!important;overflow-x:hidden}
.hidden{display:none!important}#appShell{min-height:100dvh}#authGate{background:radial-gradient(circle at 16% 24%,rgba(240,184,58,.18),transparent 35%),linear-gradient(135deg,#061e34,#0d4865);padding:24px 12px;min-height:100dvh}
#authGate .auth-card{border:1px solid rgba(245,193,85,.35);box-shadow:0 26px 70px rgba(1,21,38,.24);border-radius:26px;padding:clamp(20px,4vw,38px);max-width:470px;width:100%}
#authGate .auth-card:before{content:"مساحة عمل فريق نجم الطاقة الشمسية";display:block;font-size:12px;font-weight:800;letter-spacing:.02em;color:var(--ses-gold-dark);margin:0 0 10px}
#authGate .login-kind-btn.active{background:var(--ses-navy);color:#fff}
#authGate .btn-submit{background:linear-gradient(115deg,#0a5475,#078bae);color:white;border-radius:14px;min-height:52px}
#authGate .auth-card>p{line-height:1.85}
#sesWebRoot{display:grid;grid-template-columns:252px minmax(0,1fr);direction:rtl;min-height:100dvh}
.ses-sidebar{position:sticky;top:0;align-self:start;height:100vh;height:100dvh;background:linear-gradient(170deg,#082d49,#0b3956 57%,#0b314f);color:white;z-index:110;display:flex;flex-direction:column;box-shadow:-5px 0 24px rgba(2,31,48,.1);overflow:hidden}
.ses-brand{display:flex;align-items:center;gap:11px;padding:27px 17px 22px;border-bottom:1px solid rgba(255,255,255,.12)}
.ses-brand img{width:54px;height:54px;object-fit:contain;background:#fff;border-radius:15px;padding:6px;flex:none}.ses-brand strong{display:block;color:#fff;font-size:17px;line-height:1.5}.ses-brand small{display:block;color:#f3ca65;font-size:10px;letter-spacing:1px;direction:ltr;text-align:right;margin-top:3px}
.ses-nav-label{color:#b6cbd5;font-size:11px;font-weight:700;margin:19px 19px 7px}.ses-nav{padding:0 10px 25px;overflow-y:auto;flex:1;scrollbar-width:thin;scrollbar-color:#577e94 transparent}
.ses-nav button{display:flex;width:100%;align-items:center;gap:12px;min-height:44px;background:none;border:1px solid transparent;border-radius:12px;padding:10px 13px;cursor:pointer;color:#dcebf3;font-size:13px;font-weight:800;text-align:right;margin:3px 0;font-family:inherit;transition:background .1s,border-color .1s}
.ses-nav button:hover{background:rgba(255,255,255,.09)}.ses-nav button.active{background:rgba(240,184,58,.15);border-color:rgba(240,184,58,.27);color:#ffdf89}.ses-nav button svg{width:19px;height:19px;stroke-width:2;flex:none;stroke:currentColor}
.ses-side-foot{padding:14px 17px 21px;border-top:1px solid rgba(255,255,255,.12);font-size:11px;line-height:1.7;color:#bdcdd8}.ses-side-foot strong{display:block;color:#f7dc9a;font-size:12px}.ses-side-foot button{margin-top:10px;color:#fff;border:1px solid #688195;background:rgba(255,255,255,.06);padding:9px 14px;border-radius:10px;font-weight:700;width:100%;cursor:pointer}
.ses-workspace{min-width:0;max-width:100%;background:#f2f6f8;min-height:100dvh}
#sesWebRoot .top-header{position:relative!important;z-index:65;box-shadow:none;background:white!important;border-bottom:1px solid #e5ebee;padding:0!important}
#sesWebRoot .top-header .header-inner{max-width:none!important;margin:0;padding:14px clamp(17px,2.6vw,42px)!important}
#sesWebRoot .top-header .brand-row{margin:0;gap:12px}
#sesWebRoot .top-header .brand-logo-wrap{display:none}
#sesWebRoot .top-header .header-actions{gap:8px}
#sesWebRoot #currentUserBadge{font-size:13px!important;background:#e8f4f8;border:1px solid #d4e7ed;border-radius:100px;padding:9px 13px;color:var(--ses-deep)!important}
#sesWebRoot .top-header .header-actions .btn-pill.gold{display:none!important}
#sesWebRoot .top-header .header-actions .btn-pill{border-radius:10px;box-shadow:none}
#sesWebRoot .top-header .mode-switcher{display:none!important}
#sesWebRoot .top-header #syncStatus{display:inline-flex;align-items:center;padding:5px 9px;border-radius:9px;background:#eaf8f1;font-size:12px!important;color:#147454!important;font-weight:800!important;margin:0!important}
.ses-top-tools{display:flex;gap:12px;align-items:center;justify-content:space-between;min-width:0;flex-wrap:wrap;padding-top:12px}
.ses-location{display:flex;align-items:center;gap:7px;min-width:0;color:var(--ses-navy);font-size:12px;font-weight:800}
.ses-location b{font-size:14px}
.ses-top-picker{display:flex;align-items:center;gap:9px;flex-wrap:wrap;max-width:100%}.ses-top-picker label{font-weight:800;font-size:12px;color:var(--text-muted)}
#sesWebProjectSelect{font-family:inherit;min-width:190px;max-width:min(100%,340px);padding:10px 11px;border-radius:10px;border:1px solid #d4e5ea;background:#f7fbfc;font-weight:800;color:#12425e;font-size:12px}
.ses-menu-toggle{display:none;border:1px solid #c6dfe7;border-radius:12px;background:#f3f8f9;color:#123a51;padding:11px 13px;font-weight:800;font-family:inherit;cursor:pointer}
.ses-page-head{padding:32px clamp(17px,2.6vw,42px) 13px;background:radial-gradient(circle at 15% 35%,rgba(242,192,72,.18),transparent 25%),linear-gradient(110deg,#0d4568,#092d49);color:#fff;position:relative;overflow:hidden}
.ses-page-head:after{content:"";position:absolute;left:6%;bottom:-60px;width:200px;height:200px;border-radius:50%;border:35px solid rgba(255,255,255,.035);pointer-events:none}
.ses-page-head>*{position:relative;z-index:1}.ses-page-head .ses-head-kicker{color:#f5c969;font-size:11px;font-weight:900;letter-spacing:1px}.ses-page-head h1{font-size:clamp(21px,2.5vw,32px);line-height:1.45;margin:7px 0 7px;color:white;font-weight:900}.ses-page-head p{color:#b9d7e7;margin:0;font-size:13px;line-height:1.85;max-width:750px}
#sesWebRoot main.container{max-width:1530px!important;width:100%;margin:0 auto!important;padding:22px clamp(15px,2.6vw,42px) 60px!important;min-height:50dvh}
.ses-view{display:none;min-width:0}.ses-view.active{display:block}.ses-view.active.ses-grid-view{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}.ses-view.active.ses-grid-view>*{min-width:0}.ses-view.active.ses-grid-view>.ses-title-row{grid-column:1/-1}
.ses-section-intro{margin:0 0 18px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}.ses-section-intro h2{font-size:19px;margin:0 0 6px;color:#103a55}.ses-section-intro p{font-size:12px;line-height:1.9;color:#6b8290;margin:0}
.ses-section-intro .ses-tag{border:1px solid #e5cb8e;background:#fff8e7;color:#8f641b;border-radius:11px;padding:7px 11px;font-size:11px;font-weight:800}
.ses-web-card,.ses-mini-task,.ses-action-card{background:#fff;border:1px solid #dce8ed;border-radius:19px;box-shadow:0 10px 27px rgba(8,45,70,.045);padding:21px;margin-bottom:15px;min-width:0}
.ses-web-card h3{font-size:17px;margin:0 0 14px;color:var(--ses-deep)}.ses-web-card p{color:#607987;font-size:13px;line-height:1.85}
.ses-web-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:17px}.ses-kpi{border:1px solid #dce9ed;background:#fff;padding:20px;border-radius:17px;min-width:0}.ses-kpi small{font-size:11px;font-weight:800;color:#5c7686;display:block;margin-bottom:8px}.ses-kpi strong{font-size:25px;color:#103c56}.ses-kpi i{font-size:11px;color:var(--ses-blue);font-weight:800;font-style:normal;display:block;margin-top:6px}
.ses-kpi.gold{background:linear-gradient(125deg,#fff9e9,#fff);border-color:#f5e0ac}.ses-kpi.gold strong{color:#ae750d}.ses-kpi.green{background:linear-gradient(125deg,#eaf9f1,#fff)}.ses-kpi.green strong{color:#07885f}
.ses-split{display:grid;grid-template-columns:1.2fr 1fr;gap:16px;align-items:start}.ses-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ses-action-card{display:flex;flex-direction:column;justify-content:space-between;gap:14px;margin:0;background:linear-gradient(150deg,#fff,#f7fbfd)}.ses-action-card strong{font-size:14px;color:#16445e;line-height:1.6}.ses-action-card p{margin:6px 0 0}.ses-action-card button,.ses-mini-task button,.ses-notify-quick{padding:10px 13px;background:#0d6689;color:white;border:none;border-radius:11px;min-height:42px;font-weight:800;cursor:pointer;font-family:inherit}
.ses-task-header{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.ses-counter{background:#fff2d2;color:#8f6010;border-radius:99px;font-size:12px;font-weight:800;padding:5px 11px}
.ses-mini-task{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px;margin-bottom:10px;box-shadow:none}.ses-mini-task strong{display:block;font-size:13px;line-height:1.75}.ses-mini-task small{display:block;color:#677f8e;font-size:11px;line-height:1.85;margin-top:3px}.ses-mini-task button{flex:none;min-width:98px;font-size:12px}.ses-mini-task.red{border-right:4px solid #bc4558;background:#fff9fa}.ses-mini-task.amber{border-right:4px solid #e9ad36;background:#fffdf8}.ses-mini-task.blue{border-right:4px solid #118ab1}
.ses-empty{background:#fff;border:1px dashed #c6dbe3;color:#6a8391;padding:22px;text-align:center;border-radius:15px;font-size:13px;line-height:1.85}
.ses-current-info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.ses-fact{background:#f7fafb;border:1px solid #e6edf0;border-radius:13px;padding:14px;min-width:0}.ses-fact small{display:block;color:#718a96;font-size:11px;margin-bottom:5px}.ses-fact strong{display:block;color:#1e455d;overflow-wrap:anywhere;font-size:13px}
.ses-side-overlay{display:none}.ses-site-footer{border-top:1px solid #dfe7ed;padding:17px 20px;color:#79909b;text-align:center;font-size:11px}
#sesWebRoot .card,#sesWebRoot .custody-banner,#sesWebRoot .profit-hero{border-radius:19px!important;box-shadow:var(--shadow)!important;border:1px solid #dce9ef!important;background:#fff!important;padding:clamp(16px,1.7vw,26px)!important;margin-bottom:16px!important;max-width:none!important}
#sesWebRoot .profit-hero{background:linear-gradient(145deg,#fff8e7,#fff)!important;border-right:5px solid #e9b63b!important}
#sesWebRoot .card-header{border-bottom:1px solid #edf1f3!important;margin-bottom:18px!important;padding-bottom:16px!important;align-items:center}
#sesWebRoot .card-title{font-size:16px!important;color:#153b56!important}
#sesWebRoot .custody-banner .card-title{color:#15415d}
#sesWebRoot .dashboard-welcome{background:radial-gradient(circle at 8% 15%,rgba(244,197,84,.22),transparent 35%),linear-gradient(125deg,#0f5a7b,#082e4a)!important;border-radius:22px!important;padding:24px!important;box-shadow:0 12px 35px rgba(11,59,84,.13)!important;color:#fff!important}
#sesWebRoot .dashboard-welcome h2{color:#fff!important;font-size:clamp(22px,2.1vw,31px)!important}
#sesWebRoot .dashboard-welcome p{color:#d3e6f1!important}
#sesWebRoot .project-metrics-row{margin:18px 0!important}
#sesWebRoot .mini-stat{background:white!important;border:1px solid #dce8ed!important;border-radius:15px!important}
#sesWebRoot .mode-btn.active-admin{background:#eab73b!important}
#sesWebRoot .form-control{background:#f9fcfd!important;border:1px solid #cfdee5!important;border-radius:12px!important;padding:13px 13px!important;color:#183b52!important;font-size:14px!important;min-height:46px}
#sesWebRoot .form-control:focus{border-color:#158cad!important;outline:3px solid rgba(21,140,173,.1)!important}
#sesWebRoot .form-label{font-size:12px!important;font-weight:800!important;color:#36556a!important;margin-bottom:8px!important}
#sesWebRoot .btn-pill,#sesWebRoot .icon-btn{font-family:inherit;border-radius:11px!important;font-size:12px!important;padding:10px 13px!important;box-shadow:none!important;min-height:38px}
#sesWebRoot .btn-pill.blue,#sesWebRoot .btn-submit,#sesWebRoot .btn-pill.gold{border:0!important;min-height:42px}
#sesWebRoot .btn-pill.blue{background:#087ca3!important;color:#fff!important}
#sesWebRoot .btn-pill.gold{background:linear-gradient(120deg,#f7c754,#eab13a)!important;color:#233947!important}
#sesWebRoot .btn-submit{background:linear-gradient(115deg,#0d668d,#099bb0)!important;color:#fff!important;border-radius:13px!important;font-size:14px!important;font-weight:900!important;min-height:54px}
#sesWebRoot .btn-pill:disabled,#sesWebRoot .btn-submit:disabled{opacity:.55;cursor:not-allowed}
#sesWebRoot .chips-row,#sesWebRoot .cam-btns,#sesWebRoot .v8-toolbar,#sesWebRoot .exp-actions{gap:9px!important;flex-wrap:wrap}
#sesWebRoot .select-chip{border-radius:12px!important;line-height:1.65;padding:10px!important}
#sesWebRoot .exp-item,#sesWebRoot .v8-line,#sesWebRoot .team-person{background:#fff;border:1px solid #e0eaee!important;border-radius:13px!important;padding:13px!important;margin:8px 0!important;gap:10px}
#sesWebRoot .projects-strip{gap:12px!important}
#sesWebRoot #dashboardWelcome + .project-metrics-row{margin-top:17px}
#sesWebRoot .staff-grid{gap:11px!important}
#sesWebRoot .bottom-bar{position:static!important;background:#fff!important;box-shadow:none!important;padding:20px!important;border:1px solid #dce8ed!important;border-radius:19px!important;margin-top:16px}
#sesWebRoot .bottom-inner{max-width:100%!important;display:grid;grid-template-columns:1fr 1fr;gap:12px}
#sesWebRoot .camera-zone{border:1px dashed #afd1df!important;border-radius:16px!important;background:#f7fbfc!important}
#sesWebRoot .photo-fallback summary{font-size:12px}
#sesWebRoot .v84-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(145px,1fr))!important;gap:12px!important}
#sesWebRoot .modal-backdrop{z-index:360!important}#sesWebRoot .modal-card{max-height:90dvh!important;overflow:auto!important;border-radius:20px!important;box-shadow:0 20px 60px rgba(9,44,71,.25)!important}
#sesWebRoot .badge{font-size:11px!important}
#sesWebRoot .web-no-role{display:none}
#sesWebRoot #sesWebStageGallery{margin:0!important}
#sesWebRoot #v8ChecklistContent,#sesWebRoot #v8StagePlanList,#sesWebRoot #v8ClientApprovalList{min-width:0}
@media (min-width:1450px){#sesWebRoot{grid-template-columns:275px minmax(0,1fr)}.ses-brand{padding:28px 23px}.ses-nav{padding-inline:16px}}
@media (max-width:1050px){#sesWebRoot{grid-template-columns:210px minmax(0,1fr)}.ses-brand strong{font-size:14px}.ses-brand img{width:43px;height:43px}.ses-nav button{font-size:12px}.ses-view.active.ses-grid-view{grid-template-columns:1fr}.ses-split{grid-template-columns:1fr}}
@media (max-width:760px){
  #sesWebRoot{display:block}.ses-sidebar{position:fixed;right:0;top:0;bottom:0;width:min(85vw,310px);height:100vh;height:100dvh;transform:translateX(105%);transition:transform .17s ease;z-index:310;box-shadow:none}.ses-sidebar.open{transform:translateX(0)}
  .ses-side-overlay.open{display:block;position:fixed;inset:0;background:rgba(6,26,41,.58);z-index:300}
  .ses-menu-toggle{display:inline-flex;align-items:center;gap:8px}.ses-workspace{width:100%}
  #sesWebRoot .top-header .header-inner{padding:12px 15px!important}.ses-page-head{padding:24px 18px 25px}.ses-page-head h1{font-size:23px}.ses-page-head p{font-size:12px}
  #sesWebRoot main.container{padding:17px 13px 60px!important}.ses-top-tools{gap:9px}.ses-top-picker{flex:1;justify-content:flex-end}.ses-top-picker label{display:none}#sesWebProjectSelect{min-width:0;width:min(55vw,255px);max-width:255px;font-size:11px}
  #sesWebRoot .header-actions #currentUserBadge{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ses-web-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.ses-web-kpis .ses-kpi:last-child{grid-column:1/-1}
  .ses-action-grid{grid-template-columns:1fr}.ses-current-info{grid-template-columns:1fr 1fr}
  .ses-mini-task{align-items:flex-start;flex-direction:column}.ses-mini-task button{align-self:flex-start}
  #sesWebRoot .card,#sesWebRoot .custody-banner,#sesWebRoot .profit-hero{padding:16px!important}
  #sesWebRoot .card-header{gap:12px!important}#sesWebRoot .grid-2{grid-template-columns:1fr!important}
  #sesWebRoot .mode-switcher{display:none!important}
}
@media (max-width:370px){.ses-top-picker{width:100%;justify-content:flex-start}#sesWebProjectSelect{max-width:100%;width:calc(100vw - 44px)}.ses-current-info{grid-template-columns:1fr}.ses-web-kpis{gap:8px}.ses-kpi{padding:15px}.ses-action-card{padding:16px}.ses-page-head h1{font-size:21px}.ses-menu-toggle{padding:10px}.ses-mini-task button{width:100%}}
@media (prefers-reduced-motion:reduce){.ses-sidebar{transition:none}*{scroll-behavior:auto!important}}
/* Explicit administrator-mode control remains reachable even on a wide screen. */
#sesAdminModeToggle{display:inline-flex;align-items:center;justify-content:center;margin-inline-start:10px;font-size:11px;border-color:#dfbd72;color:#815b18;background:#fff8e7}
#sesAdminModeToggle[hidden]{display:none!important}

/* V3.1: locked stages stay visible with a check mark, not as duplicate upload tasks. */
#sesStageProgress{margin-bottom:16px!important}
.ses-stage-hint{font-size:13px;color:#637789;line-height:1.9;margin:6px 0 16px}
.ses-phase-list{display:grid;gap:9px}
.ses-phase-item{display:flex;align-items:center;gap:12px;padding:14px 15px;background:#fff;border:1px solid #dfebef;border-radius:14px;flex-wrap:wrap}
.ses-phase-num{width:34px;height:34px;min-width:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:#edf4f8;color:#0e3d5e;font-weight:900}
.ses-phase-content{flex:1;min-width:165px;display:flex;flex-direction:column;gap:3px}
.ses-phase-content strong{font-weight:900;font-size:14px;color:#122f43}
.ses-phase-content small{font-size:12px;line-height:1.6;color:#71828b}
.ses-phase-item.sent{background:#f1f8fc;border-color:#b9d9eb}.ses-phase-item.sent .ses-phase-num{background:#0b7292;color:white}
.ses-phase-item.done{background:#eefaf4;border-color:#afe1c8}.ses-phase-item.done .ses-phase-num{background:#0b946e;color:white}
.ses-phase-item.rejected{background:#fff6ec;border-color:#f0cc91}.ses-phase-item.rejected .ses-phase-num{background:#ba5d25;color:white}
.ses-phase-reason{color:#9a4724!important}
.ses-phase-action{border:1px solid #dba83a;background:#f9e8b0;color:#362b15;padding:9px 13px;border-radius:10px;font-weight:900;cursor:pointer;font-family:inherit}
.ses-phase-action.retry{background:#fff0e4;border-color:#d68c43;color:#81380b}
.ses-phase-form-closed{display:none!important}
.ses-phase-all-done{background:#e9f8f1;border:1px solid #a7d9bb;border-radius:13px;padding:15px;color:#136346;line-height:1.9;margin:10px 0}
@media(max-width:540px){.ses-phase-item{padding:12px}.ses-phase-action{width:100%}}

.ses-stage-time{display:block;color:#446884;font-size:11px;line-height:1.7;margin-top:3px;direction:rtl}
