/* DAYM OMRANIA — FINAL UNIVERSAL PORTAL HEADER / SHELL STANDARD
   This file is loaded last. It intentionally overrides legacy page CSS.
   Employee and Admin pages use identical header geometry. */
:root{
  --daym-header-height:96px;
  --daym-header-pad:28px;
  --daym-search-width:480px;
  --daym-search-height:48px;
  --daym-title-size:20px;
  --daym-subtitle-size:11px;
  --daym-kicker-size:9px;
  --daym-sidebar-admin:258px;
  --daym-sidebar-employee:242px;
}

html{width:100%;min-width:100%;scrollbar-gutter:stable both-edges;overflow-y:scroll!important;}
body.employee-portal-page,body.admin-portal-page{margin:0!important;width:100%!important;min-width:0!important;overflow-x:hidden!important;}
body.employee-portal-page *,body.admin-portal-page *{box-sizing:border-box;}

/* ==================== EMPLOYEE SHELL ==================== */
body.employee-portal-page .sidebar,
body.employee-portal-page aside.sidebar{
 position:fixed!important;left:0!important;top:0!important;right:auto!important;bottom:0!important;
 width:242px!important;min-width:242px!important;max-width:242px!important;
 height:100vh!important;min-height:100vh!important;max-height:100vh!important;
 margin:0!important;transform:none!important;transition:none!important;
 flex:0 0 242px!important;z-index:2147483000!important;
}
body.employee-portal-page .main,
body.employee-portal-page main.main,
body.employee-portal-page .employee-main,
body.employee-portal-page .main-content{
 width:calc(100% - 242px)!important;max-width:none!important;min-width:0!important;
 margin-left:242px!important;margin-right:0!important;min-height:100vh!important;
}

/* ==================== ADMIN SHELL ==================== */
body.admin-portal-page .admin-sidebar{
 position:fixed!important;left:0!important;top:0!important;right:auto!important;bottom:0!important;
 width:258px!important;min-width:258px!important;max-width:258px!important;
 height:100vh!important;min-height:100vh!important;max-height:100vh!important;
 margin:0!important;transform:none!important;transition:none!important;
 flex:0 0 258px!important;z-index:2147483000!important;
}
body.admin-portal-page .main-content,
body.admin-portal-page .admin-main{
 width:calc(100% - 258px)!important;max-width:none!important;min-width:0!important;
 margin-left:258px!important;margin-right:0!important;min-height:100vh!important;
}

/* ==================== ONE HEADER GEOMETRY ==================== */
body.employee-portal-page .topbar,
body.employee-portal-page header.topbar,
body.admin-portal-page .topbar,
body.admin-portal-page header.topbar,
body.admin-portal-page .admin-header,
body.admin-portal-page header.admin-header{
 height:96px!important;min-height:96px!important;max-height:96px!important;
 width:100%!important;min-width:0!important;margin:0!important;
 padding:0 var(--daym-header-pad)!important;
 display:flex!important;align-items:center!important;justify-content:space-between!important;
 gap:24px!important;flex-wrap:nowrap!important;
 position:relative!important;top:auto!important;left:auto!important;right:auto!important;
 transform:none!important;overflow:visible!important;z-index:900!important;
}

/* Header left/title area — identical typography. */
body.employee-portal-page .topbar > .top-title,
body.employee-portal-page .topbar > .page-heading,
body.employee-portal-page .topbar > .page-kicker,
body.employee-portal-page .topbar > div:first-child,
body.admin-portal-page .topbar > .top-title,
body.admin-portal-page .topbar > .page-heading,
body.admin-portal-page .topbar > div:first-child{
 min-width:0!important;flex:1 1 auto!important;margin:0!important;
}
body.employee-portal-page .topbar h1,
body.employee-portal-page .topbar .top-title h1,
body.employee-portal-page .topbar .page-heading h1,
body.employee-portal-page .topbar .page-title,
body.admin-portal-page .topbar h1,
body.admin-portal-page .admin-header h1,
body.admin-portal-page .topbar .top-title h1{
 font-family:Inter,Segoe UI,Arial,sans-serif!important;font-size:var(--daym-title-size)!important;
 line-height:1.2!important;font-weight:700!important;letter-spacing:-.2px!important;
 margin:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
body.employee-portal-page .topbar p,
body.employee-portal-page .topbar .page-subtitle,
body.admin-portal-page .topbar p,
body.admin-portal-page .admin-header p{
 font-size:var(--daym-subtitle-size)!important;line-height:1.35!important;font-weight:400!important;
 margin:4px 0 0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
body.employee-portal-page .topbar .eyebrow,
body.employee-portal-page .topbar small,
body.employee-portal-page .topbar .page-kicker,
body.admin-portal-page .topbar .eyebrow{
 display:block!important;font-size:var(--daym-kicker-size)!important;line-height:1!important;
 font-weight:800!important;letter-spacing:.14em!important;text-transform:uppercase!important;
 margin:0 0 5px!important;
}

/* Header right areas. */
body.employee-portal-page .topbar .top-actions,
body.employee-portal-page .topbar .top-right,
body.admin-portal-page .topbar .top-actions,
body.admin-portal-page .topbar .top-right,
body.admin-portal-page .admin-header-right{
 height:100%!important;flex:0 0 auto!important;display:flex!important;align-items:center!important;
 justify-content:flex-end!important;gap:14px!important;flex-wrap:nowrap!important;margin:0!important;
}

/* ==================== SEARCH — SAME ON EVERY PAGE ==================== */
body.employee-portal-page .topbar .search,
body.employee-portal-page .topbar form.search,
body.employee-portal-page .topbar .search-box,
body.employee-portal-page .topbar .search-small,
body.admin-portal-page .topbar .search,
body.admin-portal-page .topbar form.search,
body.admin-portal-page .topbar .search-box,
body.admin-portal-page .admin-search{
 width:480px!important;min-width:480px!important;max-width:480px!important;
 height:48px!important;min-height:48px!important;max-height:48px!important;
 flex:0 0 480px!important;margin:0!important;padding:0 14px!important;
 display:flex!important;align-items:center!important;position:relative!important;
 border-radius:14px!important;overflow:hidden!important;box-sizing:border-box!important;
}
body.employee-portal-page .topbar .search input,
body.employee-portal-page .topbar .search-box input,
body.employee-portal-page .topbar .search-small input,
body.admin-portal-page .topbar .search input,
body.admin-portal-page .topbar .search-box input,
body.admin-portal-page .admin-search input{
 width:100%!important;height:48px!important;min-height:48px!important;max-height:48px!important;
 margin:0!important;padding:0 34px!important;border:0!important;outline:0!important;
 background:transparent!important;font-family:Inter,Segoe UI,Arial,sans-serif!important;
 font-size:12px!important;font-weight:400!important;line-height:48px!important;
}
body.employee-portal-page .topbar .search i,
body.employee-portal-page .topbar .search-box i,
body.employee-portal-page .topbar .search-small i,
body.admin-portal-page .topbar .search i,
body.admin-portal-page .topbar .search-box i,
body.admin-portal-page .admin-search i{
 position:absolute!important;left:15px!important;top:50%!important;transform:translateY(-50%)!important;
 margin:0!important;font-size:13px!important;z-index:2!important;
}
body.employee-portal-page .topbar .search-key,
body.employee-portal-page .topbar kbd,
body.admin-portal-page .topbar kbd,
body.admin-portal-page .topbar .shortcut{
 position:absolute!important;right:10px!important;top:50%!important;transform:translateY(-50%)!important;
 font-size:8px!important;line-height:16px!important;height:18px!important;padding:0 6px!important;
 display:grid!important;place-items:center!important;border-radius:5px!important;
}

/* Header controls have one fixed footprint. */
body.employee-portal-page .topbar .riyadh-clock,
body.employee-portal-page .topbar .bell,
body.employee-portal-page .topbar .bell-button,
body.employee-portal-page .topbar .notify,
body.employee-portal-page .topbar .profile,
body.employee-portal-page .topbar .top-profile,
body.admin-portal-page .topbar .bell,
body.admin-portal-page .topbar .icon-btn,
body.admin-portal-page .topbar .top-user,
body.admin-portal-page .topbar .top-profile,
body.admin-portal-page .admin-bell,
body.admin-portal-page .admin-head-user{
 flex:0 0 auto!important;margin:0!important;
}
body.employee-portal-page .topbar .bell,
body.employee-portal-page .topbar .bell-button,
body.employee-portal-page .topbar .notify,
body.admin-portal-page .topbar .bell,
body.admin-portal-page .topbar .icon-btn,
body.admin-portal-page .admin-bell{
 width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
 max-width:44px!important;max-height:44px!important;
}
body.employee-portal-page .topbar .profile-avatar,
body.employee-portal-page .topbar .profile-photo,
body.employee-portal-page .topbar .top-profile-avatar,
body.employee-portal-page .topbar .profile-avatar-wrap img,
body.admin-portal-page .admin-head-avatar,
body.admin-portal-page .top-avatar,
body.admin-portal-page .top-user .avatar{
 width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;
 max-width:42px!important;max-height:42px!important;object-fit:cover!important;border-radius:50%!important;
}
body.employee-portal-page .topbar .profile-name strong,
body.employee-portal-page .topbar .top-profile-name,
body.employee-portal-page .topbar .top-profile-info .top-profile-name,
body.admin-portal-page .topbar .top-name,
body.admin-portal-page .topbar .top-user strong,
body.admin-portal-page .admin-head-user strong{font-size:12px!important;line-height:1.2!important;}
body.employee-portal-page .topbar .profile-role,
body.employee-portal-page .topbar .top-profile-role,
body.admin-portal-page .topbar .top-role,
body.admin-portal-page .topbar .top-user span,
body.admin-portal-page .admin-head-user span{font-size:9px!important;line-height:1.2!important;margin-top:3px!important;}

/* Admin module header has exactly the same 96px geometry. */
body.admin-portal-page .admin-header .admin-search{margin-right:auto!important;}
body.admin-portal-page .admin-header .admin-report-btn{height:44px!important;min-height:44px!important;max-height:44px!important;}

/* Legacy admin pages using components/topbar.php. */
body.admin-portal-page .main-content > .topbar{width:100%!important;margin:0!important;}

/* Never allow old media queries to change shell/header geometry. */
@media(max-width:1200px){
 body.employee-portal-page .topbar,body.employee-portal-page header.topbar,
 body.admin-portal-page .topbar,body.admin-portal-page header.topbar,
 body.admin-portal-page .admin-header,body.admin-portal-page header.admin-header{height:96px!important;min-height:96px!important;max-height:96px!important;padding:0 20px!important;}
 body.employee-portal-page .topbar .search,body.employee-portal-page .topbar form.search,body.employee-portal-page .topbar .search-box,body.employee-portal-page .topbar .search-small,
 body.admin-portal-page .topbar .search,body.admin-portal-page .topbar form.search,body.admin-portal-page .topbar .search-box,body.admin-portal-page .admin-search{width:480px!important;min-width:480px!important;max-width:480px!important;flex-basis:480px!important;}
}
@media(max-width:700px){
 body.employee-portal-page .topbar,body.admin-portal-page .topbar,body.admin-portal-page .admin-header{min-width:760px!important;}
}

/* ==================== ADMIN BRAND / LOGO ==================== */
body.admin-portal-page .admin-brand{height:121px!important;min-height:121px!important;max-height:121px!important;padding:22px 20px!important;}
body.admin-portal-page .admin-brand-link{display:flex!important;align-items:center!important;gap:12px!important;width:100%!important;height:100%!important;}
body.admin-portal-page .admin-brand-logo{width:42px!important;height:48px!important;min-width:42px!important;min-height:48px!important;display:grid!important;place-items:center!important;overflow:hidden!important;}
body.admin-portal-page .admin-brand-logo img{display:block!important;width:42px!important;height:48px!important;max-width:42px!important;max-height:48px!important;object-fit:contain!important;opacity:1!important;visibility:visible!important;}
body.admin-portal-page .admin-brand strong{font-size:17px!important;line-height:1.1!important;white-space:nowrap!important;}
body.admin-portal-page .admin-brand span{font-size:9px!important;line-height:1.2!important;white-space:nowrap!important;}
